-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathESP8266
48 lines (35 loc) · 944 Bytes
/
ESP8266
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#define BLYNK_PRINT Serial
/* Fill-in your Template ID (only if using Blynk.Cloud) */
#define BLYNK_TEMPLATE_ID "TMPLG5yHg7Kn"
#include <ESP8266_Lib.h>
#include <BlynkSimpleShieldEsp8266.h>
//
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "Lv-6LMvwJgY37KkIT-w_cPfZgb_L3xsU";
// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "먼지";
char pass[] = "qwertyuiop";
// Hardware Serial on Mega, Leonardo, Micro...
#define EspSerial Serial1
// or Software Serial on Uno, Nano...
//#include <SoftwareSerial.h>
//SoftwareSerial EspSerial(2, 3); // RX, TX
// Your ESP8266 baud rate:
#define ESP8266_BAUD 9600
ESP8266 wifi(&EspSerial);
void setup()
{
// Debug console
Serial.begin(9600);
delay(10);
// Set ESP8266 baud rate
EspSerial.begin(ESP8266_BAUD);
delay(10);
Blynk.begin(auth, wifi, ssid, pass);
}
void loop()
{
Blynk.run();
}