Skip to content

Conversation

bstin
Copy link

@bstin bstin commented Sep 23, 2024

The print function will now recognize newline and center chars and modify string accordingly.

The newline and center chars are configurable but set as "\n" and "\c" by default.

For example:

lcd.print("Line1\nLine2") will print (assuming 16 cols):

"Line1           "
"Line2           "

lcd.print("\cLine1\n\cLine2") will print (assuming 16 cols):

"     Line1      "
"     Line2      "

They can be mixed and matched, so this also works.

lcd.print("\cLine1\nLine2") will print (assuming 16 cols):

"     Line1      "
"Line2            "

The print function will now recognize newline and center chars and modify string accordingly. 

The newline and center chars are configurable but set as "\n" and "\c" by default.
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.

1 participant