-->
Page 1 of 5

LCD 2004 doesn' work as expected :?

PostPosted: Thu Aug 20, 2015 2:52 pm
by Gutty
Hi,

I am new in this forum, and I want to ask if somebody can verify my problem or solve it.

I have a simple sketck to check my lcd with I2C. It works, but the cursor keeps blinking. I don't want to see cursor.

Code: Select all#include <Streaming.h>
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
const int MAX_PACKET_SIZE = 101;
char packetBuffer[ MAX_PACKET_SIZE];
LiquidCrystal_I2C lcd(0x3f, 20, 4);
void setup()
{
  Wire.begin(2, 4);

  lcd.home();
  lcd.setCursor(0, 1);
  lcd.print("   Setup ...");
  Serial.begin(115200);
  Serial.println("   Setup ...");
  delay(500);
  strcpy(packetBuffer, "Pool  28.6 Erw. 0.0 Sonne 21.6 Ret. 26.8Luft  25.6 Vor. 27.2Pumpe  0   Wind 1.86");
  Serial << packetBuffer << endl;
  lcd.setCursor(0, 0);
  lcd << packetBuffer ;
  delay(2000);
  lcd.noCursor();
}
void loop(){}


The text appears, but after the delay the diplay clears and hangs up. After a reset no more text on the display, I have to disconnect the power to make work the display again.
The same happens with other options, like cursor_off etc. :(

I think that is a problem with the library. Which one does work well?

I hope you understand what I mean, english is not my native language.

Re: LCD 2004 doesn' work as expected :?

PostPosted: Thu Aug 20, 2015 3:27 pm
by martinayotte
What is the model number of your LCD ?
Because maybe some models simply hangs if you send more character than it can display.

Re: LCD 2004 doesn' work as expected :?

PostPosted: Thu Aug 20, 2015 3:33 pm
by Gutty
No idea. bought cheao on ebay. Works well with Arduino uno and another library. But the other library I don't get work it with ESP8266
And the one I have that works with esp8266 makes that problem. Because of this I suppose a library problem

Re: LCD 2004 doesn' work as expected :?

PostPosted: Fri Aug 21, 2015 2:09 am
by schufti
there is a fault in the Wire library so it doesn't handle NACKs correctly. Maybe your LCD is a little "sensible".

replace the attached file in your path leading to ".....\packages\esp8266\hardware\esp8266\1.6.5-1044-g170995a\cores\esp8266"