-
Notifications
You must be signed in to change notification settings - Fork 932
Improve I2C LCD example #675
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
i2c/lcd_1602_i2c/i2c_lcd.h
Outdated
void i2c_lcd_writeString(i2c_lcd_handle inst, char* string); | ||
void i2c_lcd_writeStringf(i2c_lcd_handle inst, const char* __restrict format, ...) _ATTRIBUTE ((__format__ (__printf__, 2, 3))); | ||
void i2c_lcd_writeChar(i2c_lcd_handle inst, char c); | ||
void i2c_lcd_writeLines(i2c_lcd_handle inst, char* line1, char* line2); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function-signature seems to be assuming that you're using a 16x2 LCD, and precludes the usage of a 20x4 LCD?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's correct. The example name specifically says it's for 16x2. I also don't have 20x4 hardware to validate against.
This PR improve the I2C LCD example in the following ways:
The following article was used as a reference for timing: https://web.alfredstate.edu/faculty/weimandn/lcd/lcd_initialization/lcd_initialization_index.html
This code has been tested on real hardware with a Pi Pico.
Fixes #654
Fixes #597