Skip to content

Instantly share code, notes, and snippets.

View clive520's full-sized avatar

clive520 clive520

View GitHub Profile
@clive520
clive520 / 機房溫度通知_ESP8266_DHT11_NTP_Google表單_LINE_ThingSpeak_溫度過高警示
Last active August 16, 2020 07:43
機房溫度通知_ESP8266_DHT11_NTP_Google表單_LINE_ThingSpeak_溫度過高警示
#include <ESP8266WiFi.h> //WIFI
#include <WiFiUdp.h>
#include "esp_NTPClient.h" //NTP
#include <WiFiClientSecure.h>
#include "esp_DHTesp.h" //DHT 11
float Temp = 0; //溫度
float HUM = 0; //濕度
String T_Time; //NTP取出時間
String T_Time_STR; //NTP取出時間,換成int的中繼站
@clive520
clive520 / 機房溫度通知_ESP8266_DHT11_NTP_Google表單_LINE_ThingSpeak
Last active August 16, 2020 07:43
機房溫度通知_ESP8266_DHT11_NTP_Google表單_LINE_ThingSpeak
#include <ESP8266WiFi.h> //WIFI
#include <WiFiUdp.h>
#include "esp_NTPClient.h" //NTP
#include <WiFiClientSecure.h>
#include "esp_DHTesp.h" //DHT 11
float Temp = 0; //溫度
float HUM = 0; //濕度
String T_Time; //NTP取出時間
String T_Time_STR; //NTP取出時間,換成int的中繼站
@clive520
clive520 / DHT11_WS2812_remoteXY_ESP32
Created August 14, 2020 04:14
DHT11_WS2812_remoteXY_ESP32
//////////////////////////////////////////////
// RemoteXY include library //
//////////////////////////////////////////////
// RemoteXY select connection mode and include library
#define REMOTEXY_MODE__ESP32CORE_WIFI_POINT
#include <WiFi.h>
#include <RemoteXY.h>
@clive520
clive520 / 單元10_ESP8266_控制WS2812B_彩虹呈現
Created August 14, 2020 02:19
單元10_ESP8266_控制WS2812B_彩虹呈現
#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
#include <avr/power.h> // Required for 16 MHz Adafruit Trinket
#endif
#define LED_PIN 4
#define LED_COUNT 10
Adafruit_NeoPixel strip(LED_COUNT, LED_PIN, NEO_GRB + NEO_KHZ800);
@clive520
clive520 / WIFI07_傳送訊息到Google 表單_ESP32 NodeMCU 32S
Last active August 14, 2020 01:41
WIFI07_傳送訊息到Google 表單_ESP32 NodeMCU 32S
#include <WiFi.h>
#include <WiFiMulti.h>
WiFiMulti wifiMulti;
#define LED_BUILTIN 2 // 連接到WIFI時,亮內建的LED
//連接LINE
#include <WiFiClientSecure.h>
WiFiClientSecure Secure_client;
@clive520
clive520 / WIFI06_傳送訊息到LINE_ESP32 NodeMCU 32S
Created August 14, 2020 00:58
WIFI06_傳送訊息到LINE_ESP32 NodeMCU 32S
#include <WiFi.h>
#include <WiFiMulti.h>
WiFiMulti wifiMulti;
#define LED_BUILTIN 2 // 連接到WIFI時,亮內建的LED
//連接LINE
#include <WiFiClientSecure.h>
WiFiClientSecure Secure_client;
String LINE_TOKEN;
@clive520
clive520 / WS2812B製成數字時鐘 ESP32 NodeMCU 32S
Created August 13, 2020 03:23
WS2812B製成數字時鐘 ESP32 NodeMCU 32S
#include <NTPClient.h> //NTP library
#include <WiFiUdp.h>
#include <WiFi.h>
//多個SSID自動連接library
#include <WiFiMulti.h>
WiFiMulti wifiMulti;
//WS2812B 設定
#include <Adafruit_NeoPixel.h>
@clive520
clive520 / ESP32 NodeMCU 32S 取得網路時間
Last active August 13, 2020 01:37
ESP32 NodeMCU 32S 取得網路時間
#include <WiFi.h>
#include <NTPClient.h>
#include <WiFiUdp.h>
// Replace with your network credentials
const char* ssid = "book";
const char* password = "12345678";
// Define NTP Client to get time
WiFiUDP ntpUDP;
@clive520
clive520 / ESP32 NodeMCU 32S Web Server控制ESP32
Created August 13, 2020 01:33
ESP32 NodeMCU 32S Web Server控制ESP32
#ifdef ESP32
#include <WiFi.h>
#include <AsyncTCP.h>
#else
#include <ESP8266WiFi.h>
#include <ESPAsyncTCP.h>
#endif
#include <ESPAsyncWebServer.h>
// Replace with your network credentials 輸入WIFI的SSID和密碼
@clive520
clive520 / ESP32 NodeMCU 32S Telegram控制ESP32
Created August 13, 2020 01:32
ESP32 NodeMCU 32S Telegram控制ESP32
#ifdef ESP32
#include <WiFi.h>
#else
#include <ESP8266WiFi.h>
#endif
#include <WiFiClientSecure.h>
#include <UniversalTelegramBot.h> // Universal Telegram Bot Library written by Brian Lough: https://github.com/witnessmenow/Universal-Arduino-Telegram-Bot
#include <ArduinoJson.h>
// Replace with your network credentials