Liquid Crystal I2C LCD Usage Issues

Before creating the topic

  1. Search forum for similar topics
  2. Check http://docs.blynk.cc and http://help.blynk.cc/
  3. Add details :
    • Hardware model + communication type. For example: Arduino UNO with Ethernet Shield
    • Smartphone OS (iOS or Android) + version
    • Blynk server or local server
    • Blynk Library version
    • Add your sketch code. :point_up:Code should be formatted as example below.

Simply paste your code between ``` If you don’t format your code, your topic can be deleted by moderators.

Hi.
I am used Aruino Uno with ESP8266 wifi for I2C LCD(16x2)
My aruino continues to connect when “LiquidCrystal_I2C lcd (0x27, 16, 2);” is enabled.
As shown in the picture below!

2019-06-27%2022_28_38-COM7

However, annotating this code will operate normally.
//LiquidCrystal_I2C lcd(0x27, 16, 2);
What’s the problem?


#include <LiquidCrystal_I2C.h>
#include <Wire.h>
#define BLYNK_PRINT Serial
#include <ESP8266_Lib.h>
#include <BlynkSimpleShieldEsp8266.h>

LiquidCrystal_I2C lcd(0x27, 16, 2);

char auth[] = "";
char ssid[] = "To_2.4Ghz";
char pass[] = "kkkkkkkk";
int pinData;

#include <SoftwareSerial.h>
SoftwareSerial EspSerial(2, 3); // RX, TX

#define ESP8266_BAUD 9600

ESP8266 wifi(&EspSerial);
WidgetTerminal terminal(V6);

void setup()
{
  // Debug console
  Serial.begin(115200);

  // Set ESP8266 baud rate
  EspSerial.begin(ESP8266_BAUD);
  delay(10);

  Blynk.begin(auth, wifi, ssid, pass);

  lcd.init();
  lcd.backlight();
}

BLYNK_WRITE(V2)  
{
    phValue= param.asFloat();
}
void loop()
{
  Blynk.run();
  lcd.print("  Hello World!!  ");  
} 

BLYNK_READ(V1) //Blynk app has something on V5
{
 Blynk.virtualWrite(V1, doValue); //sending to Blynk
}

Without seeing your code it’s impossible to say, but my guess is that you’re doing something in your void loop that Blynk doesn’t like.

Pete,

1 Like

I registered my code.

You need to make a function which prints the text on LCD and call that function using Blynk Timer
Check this code to print text on I2C LCD.

#define BLYNK_PRINT Serial
#include <ESP8266_Lib.h>
#include <BlynkSimpleShieldEsp8266.h>

#include <LiquidCrystal_I2C.h>

char auth[] = "xxxxxxxxxxxxxxxxxxxxx";
char ssid[] = "xxxxxx";
char pass[] = "xxxxxxx";

LiquidCrystal_I2C lcd(0x27, 16, 2);

#include <SoftwareSerial.h>
SoftwareSerial EspSerial(2, 3);  // RX, TX

#define ESP8266_BAUD 115200

BlynkTimer timer;

ESP8266 wifi(&EspSerial);

void printOnLcd() {     
  lcd.print(F("Hello World: "));
}

void setup()  {
  Serial.begin(9600);
  EspSerial.begin(ESP8266_BAUD);
  delay(10);
  Blynk.begin(auth, wifi, ssid, pass);
  lcd.begin(16, 2);
  lcd.init();
  lcd.backlight();

  timer.setInterval(1000L, printOnLcd);
}

void loop() {
  Blynk.run();
  timer.run();
}

Hope this helps. :smile::smile:

Thank you for your opinion.:wink:

I’ll make up for it in the way you informed me.:grinning:

1 Like

i have same problem, do you have solved that?

@revanza12305 This is a three year old topic and Blynk has changed substantially during this period.
I’d suggest that you create a new “Need help with my project” topic and provide ALL of the information that is requested when you do that, along with information about your LCD display and how you’ve connected it, and how you are powering it.

Pete.