/************************************************************** * Credits to Blynk Team for the wonderful App **************************************************************/ #define BLYNK_PRINT Serial // Comment this out to disable prints and save space #include #include // You should get Auth Token in the Blynk App. // Go to the Project Settings (nut icon). char auth[] = "+++++++++++++++++++"; //insert here your token generated by Blynk WidgetLCD lcd(V1);//virtual port for lcd void setup() { Serial.begin(9600); // See the connection status in Serial Monitor Blynk.begin(auth, "++++++++++", "++++++++"); //insert here your SSID and password while (Blynk.connect() == false) { // Wait until connected } lcd.clear(); //Use it to clear the LCD Widget pinMode(0, INPUT); // gpio 0 input button pinMode(1, INPUT); // gpio 1 input button pinMode(2, INPUT); // gpio 2 input button pinMode(3, INPUT); // gpio 3 input button bool current = 0; bool previous = 1; } void loop() { Blynk.run(); //----------------button virtual LCD--------------- byte inp0 = digitalRead(0); if (inp0 == HIGH) { lcd.print(1, 0, "S1 ON"); } else //lcd.clear(); lcd.print(1, 0, "S1OFF"); byte inp1 = digitalRead(1); if (inp1 == HIGH) { lcd.print(9, 0, "S2 ON"); } else lcd.print(9, 0, "S2OFF"); byte inp2 = digitalRead(2); if (inp2 == HIGH) { lcd.print(1, 1, "S3 ON"); } else lcd.print(1, 1, "S3OFF"); byte inp3 = digitalRead(3); if (inp3 == HIGH) { lcd.print(9, 1, "S4 ON"); } else lcd.print(9, 1, "S4OFF"); }