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 "WiFi.h" | |
void setup(){ | |
Serial.begin(9600); | |
WiFi.mode(WIFI_MODE_STA); | |
Serial.println(""); | |
Serial.print("Mac Address :"); | |
Serial.println(WiFi.macAddress()); //WiFi.macAddress()讀出機器的MAC | |
} |
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 "WiFi.h" | |
void setup() | |
{ | |
Serial.begin(9600); | |
WiFi.mode(WIFI_STA); | |
WiFi.disconnect(); | |
delay(100); | |
Serial.println("Setup done"); | |
} |
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 <WiFi.h> | |
#define LED_BUILTIN 2 // 連接到WIFI時,亮內建的LED | |
// 輸入你的SSID和密碼 | |
const char *ssid = "book"; | |
const char *password = "12345678"; | |
void setup() { | |
pinMode(LED_BUILTIN, OUTPUT); | |
digitalWrite(LED_BUILTIN,LOW) ; |
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 <WiFi.h> | |
#include <WiFiMulti.h> | |
WiFiMulti wifiMulti; | |
#define LED_BUILTIN 2 // 連接到WIFI時,亮內建的LED | |
void setup() | |
{ | |
pinMode(LED_BUILTIN, OUTPUT); | |
digitalWrite(LED_BUILTIN,LOW) ; | |
Serial.begin(9600); |
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 <WiFi.h> | |
#include <WiFiMulti.h> //多個SSID自動連接library | |
WiFiMulti wifiMulti; | |
#define LED_BUILTIN 2 | |
WiFiServer server(80); | |
void setup() | |
{ |
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
////////////////////////////////////////////// | |
// RemoteXY include library // | |
////////////////////////////////////////////// | |
// RemoteXY select connection mode and include library | |
#define REMOTEXY_MODE__ESP8266WIFI_LIB_POINT | |
#include <ESP8266WiFi.h> | |
#include <RemoteXY.h> |
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 "esp_NTPClient.h" | |
#include <WiFiUdp.h> | |
//宣告變數 | |
String T_Time = ""; | |
String T_Time_STR = "" ; | |
int H01=0; //H01代表小時的個位數 | |
int H10=0; //H10代表小時的十位數 | |
int HH=0; //HH代表小時的數量 | |
int M01=0; //M01代表分鐘的個位數 |
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
/* | |
-- 樓梯 -- | |
樓梯上下各有一個紅外線感應器,有人靠近樓梯及開啟樓梯電燈,並傳送LINE告知,傳送開燈時間到thingspeak | |
DHT11 溫溼度感應器,傳送溫溼度到thingspeak | |
RemoteXY利用wifi連線 | |
RemoteXY_stairs 12345678 | |
D5==14 繼電器 | |
D6==12 樓上人體紅外線感應器 |
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
/* | |
-- 網路連接 -- | |
RemoteXY | |
Software Serial RX==>D1 TX==>D2 speed9600 | |
tex_1 和 text_2 | |
motoduino | |
D4=2 接DHT11 | |
A0=17 接光敏電阻 |
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
/* | |
-- 藍芽 -- | |
RemoteXY | |
藍芽連接 NodeMCU V3 H05(06) Arduino IDE | |
Software Serial RX==>D1 TX==>D2 speed9600 | |
tex_1 和 text_2 | |
motoduino | |
D4=2 接DHT11 | |
上傳溫度和濕度資料到 |