I still have the same problem with this code
#include <Wire.h>
#include <inttypes.h>
#include <LCDi2cNHD.h>
LCDi2cNHD lcd = LCDi2cNHD(4,20,0x50>>1,0);
uint8_t rows = 4;
uint8_t cols = 20;
void setup() {
Serial.begin(9600);
Wire.setClock(400000);
lcd.init();
lcd.print("Please wait...");
}
void loop() {
lcd.setCursor(0, 0);
lcd.print("Speed: ");
lcd.setCursor(1, 0);
lcd.print("Press: ");
delay(1000);
}
J-M-L
November 7, 2023, 10:41am
47
have you tried their example
////////////////////////////////////////////////////////////////////////////////////
// [] i2c LCD library Display Test Demo
// [] Original was 4-2-2009 dale@wentztech.com
// [] DGG 2012-04-11 - Libraries were modified to run under Arduino 1.0
////////////////////////////////////////////////////////////////////////////////////
#define VERSION "1.X"
#include <Wire.h>
#include <inttypes.h>
// Uncomment the two lines for the display you are using
// http://www.newhavendisplay.com display
#include <LCDi2cNHD.h>
LCDi2cNHD lcd = LCDi2cNHD(4,20,0x50>>1,0);
// web4robot.com display
//#include <LCDi2cW.h>
//LCDi2cW lcd = LCDi2cW(2,16,0x4C,0);
This file has been truncated. show original
Yup still glitches with this test code. Found a github post which mentioned the same problem which hadn't been resloved...
Starting to lose hope in this LCD
J-M-L
November 7, 2023, 11:26am
49
it seems to support SPI too. have you tried?
Yup also did and it still does the same thing
J-M-L
November 7, 2023, 11:27am
51
100KHz is the default speed for your I2C interface on Arduino and it's the max the screen can support. have you tried lowering the I2C speed to, say 10KHz ?
Hmm that might work, this can be done by just changing the Wire.setClock(400000) to Wire.setClock(50000) right?
J-M-L
November 7, 2023, 11:32am
53
try with 10000 (low speed mode)
Just tried this, still the same issue
J-M-L
November 7, 2023, 12:14pm
55
OK... get a cheap I2C LCD2004 from the Far East, they work well
make sure they come with the I2C backpack soldered
Will do that, thought a more expensive one would be better to use unfortunately that is not the case..
Thanks anyway for your effort and help!
J-M-L
November 7, 2023, 12:17pm
57
you could probably dig into the spec to see if they need to be configured a special way
system
Closed
May 5, 2024, 12:17pm
58
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.