#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
char auth[] = "*********";
char ssid[] = "*";
char pass[] = "";
WidgetTerminal terminal(V0);
void setup()
{
// Debug console
Serial.begin(9600);
pinMode(D1, OUTPUT);
digitalWrite(D1, LOW);
Blynk.begin(auth, ssid, pass);
}
BLYNK_WRITE(V1)
{
if (param.asInt() == 1) {
digitalWrite(D1, HIGH);
terminal.println();
terminal.println();
terminal.println();
terminal.println(" LIGHT ON");
terminal.println();
terminal.println();
terminal.println();
terminal.flush();
}
else {
digitalWrite(D1, LOW);
terminal.println();
terminal.println();
terminal.println();
terminal.println(" LIGHT OFF");
terminal.println();
terminal.println();
terminal.println();
terminal.flush();
}
}
void loop()
{
Blynk.run();
}
Do you have a question?
Please remember to use code tags when posting code
Hi, @prabhath1
Welcome to the forum.
Please read the post at the start of any forum , entitled "How to use this Forum".
Thanks.. Tom...
system
Closed
4
This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.