micropython-i2c-lcd
micropython-i2c-lcd copied to clipboard
Extended print with newline and center char
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 "