Skip to content

Update i2c-lcd1602.c #6

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JacksonJoseG
Copy link

i2c_lcd1602_write_string() modified:
Automatically moves to second line if a '\n' char is detected.

Automatically moves to second line if a '\n' char is detected.
@DavidAntliff
Copy link
Owner

DavidAntliff commented Sep 1, 2024

Thanks for the PR.

This component also works with the LCD2004 module (4 lines). Before I can merge this, can you consider what happens with the 4-line display, please? It would need to advance the "cursor" (i.e. place where the next character would appear) to the next line, rather than line 2.

Also, consider what would happen if the cursor was on the last line of the display. Should it jump back to the top? Or should the entire display scroll up and new characters appear on the bottom line? Or maybe it just stays on the bottom line but moves to the far left?

These questions are why I kept the newline behaviour explicit for now (as in, handle it yourself, outside the library), as different users may have different requirements or expectations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants