Professional Documents
Culture Documents
• An authentication code is then sent to the app that has the same authentication code and
then, the app receives the data to create a secure connection between the app and the
ESP8266.
• The data(instructions to control LED) from the Blynk app is sent to the Blynk server along
with the authentication code and since the ESP8266 has already the same authentication
code which is connected with the Blynk server, the server identifies the matching code and
data is sent to the corresponding ESP8266. Then the ESP8266 microcontroller turns ON the
LED.
#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
void setup()
{
// Debug console
Serial.begin(9600);
Blynk.begin(auth, ssid, pass);
// You can also specify server: , Blynk.begin(auth, ssid, pass, "blynk-cloud.com", 80);
//Blynk.begin(auth, ssid, pass, IPAddress(192,168,1,100), 8080);
}
void loop()
{
Blynk.run();
// You can inject your own code or combine it with other sketches.
// how to communicate with Blynk. Remember to avoid delay() function!
}