Hey Blynk community!
I am creating an IOT design project which will include an LCD 16x2 screen display connected to the Blynk App (on IOS) I am trying to connect the LCD Widget to a Particle Photon board using the ‘Particle Web IDE Builder’ so that both will display the same text, but I am having difficulty displaying what’s in the app onto the physical display! Can anyone help? I am pretty new to this! My code is below:
#include <blynk.h>
#define BLYNK_PRINT Serial
#include <LiquidCrystal_I2C.h>
#include "application.h"
#include "LiquidCrystal/LiquidCrystal.h"
char auth[] = "";
WidgetLCD lcd(V1);
void setup()
{
Serial.begin(9600);
Blynk.begin(auth);
LiquidCrystal lcd(D0, D1, D2, D3, D4, D5);
}
int buttonState;
BLYNK_WRITE(V2)
{
buttonState = param.asInt();
}
void loop()
{
Blynk.run();
if (buttonState == LOW) {
lcd.print(0, 0, "Disconnect Says"); // use: (position X: 0-15, position Y: 0-1, "Message you want to print")
lcd.print(0, 1, "Read ");
} else if (buttonState == HIGH) {
lcd.print(0, 0, "Disconnect Says"); // use: (position X: 0-15, position Y: 0-1, "Message you want to print")
lcd.print(0, 1, "Draw something");
}
}