Code:
#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
void setup() {
#include <BlynkSimpleEsp8266.h>
//Set the LED pin as an output pin
pinMode(D0, OUTPUT);
#define BLYNK_AUTH_TOKEN "" //Enter your blynk auth token
//Initialize the Blynk library
Blynk.begin(auth, ssid, pass, "blynk.cloud", 80);
char auth[] = BLYNK_AUTH_TOKEN;
}
char ssid[] = "";//Enter your WIFI name
char pass[] = "";//Enter your WIFI password
void loop() {
//Run the Blynk library
//Get the button value
Blynk.run();
BLYNK_WRITE(V0) {
}
digitalWrite(D0, param.asInt());
}
void setup() {
//Set the LED pin as an output pin
pinMode(D0, OUTPUT);
//Initialize the Blynk library
Blynk.begin(auth, ssid, pass, "blynk.cloud", 80);
}
void loop() {
//Run the Blynk library
Blynk.run();
}
0 Comments