This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <ESP8266WiFi.h> | |
#include <PubSubClient.h> | |
#include <DHT.h> | |
DHT dht(D5, DHT22); | |
const char* ssid = "........"; | |
const char* password = "........"; | |
IPAddress mqttServer(192, 168, 1, 10); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <unistd.h> | |
#include "driver/adc.h" | |
#include "driver/gpio.h" | |
#include "driver/rtc_io.h" | |
#include "soc/cpu.h" | |
const char* names[] = {"D2", "D3", "CLK", "CMD", "D0", "D1"}; | |
const int pins[] = {12, 13, 14, 15, 2, 4}; | |
const int adc_channels[] = {5, 4, 6, 3, 2, 0}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Download SMTPClient library from https://github.com/gregington/SMTPClient | |
#include <ESP8266WiFi.h> | |
#include <Client.h> | |
#include <Mail.h> | |
#include <SMTPClient.h> | |
WiFiClient wifiClient; | |
SmtpClient client(&wifiClient, "smtp.163.com"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include "esp_err.h" | |
#include "driver/ledc.h" | |
#include "driver/periph_ctrl.h" | |
void app_main() | |
{ | |
periph_module_enable(PERIPH_LEDC_MODULE); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <ESP8266WiFi.h> | |
#include <ESP8266WebServer.h> | |
const char* ssid = ".............."; | |
const char* password = "................"; | |
String form = "<form action='led'><input type='radio' name='state' value='1' checked>On<input type='radio' name='state' value='0'>Off<input type='submit' value='Submit'></form>"; | |
String imagepage = "<img src='/led.png'>"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <ESP8266WiFi.h> | |
#include <WiFiUDP.h> | |
const char* ssid = ".........."; | |
const char* password = "..........."; | |
WiFiUDP listener; | |
void setup() { | |
Serial.begin(115200); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from bs4 import BeautifulSoup as bs | |
from dateutil import parser | |
from datetime import datetime | |
import requests | |
import re | |
# search for all buses leaving from one station in any direction | |
URL = 'http://jizdnirady.idnes.cz/brno/odjezdy/?f=cervinkova&fc=302003&lng=E&submit=true' | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <ESP8266WiFi.h> | |
#include <WiFiClient.h> | |
#include <ESP8266WebServer.h> | |
#include <ESP8266mDNS.h> | |
#include <time.h> | |
const char* ssid = "co2_sensor"; | |
const char* password = "1qazxsw2"; | |
ESP8266WebServer server(80); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SPDX-FileCopyrightText: 2017 Tony DiCola for Adafruit Industries | |
# | |
# SPDX-License-Identifier: MIT | |
# | |
# MicroPython module for the TLC5947 12-bit 24 channel LED PWM driver. | |
# Based on CircuitPython version of the same by Tony DiCola, Walter Haschka. | |
# | |
from machine import Pin, SPI |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
OTA update over HTTPS | |
As an example, we download and install ESP8266Basic firmware from github. | |
Requires latest git version of the core (November 17, 2015) | |
Created by Ivan Grokhotkov, 2015. | |
This example is in public domain. | |
*/ |