summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
990c4d5)
Many thanks for putting together this library / short tutorial. It got me kickstarted with using a 20x4 LCD with my Pico.
Here's some giving back, instead of writing: `2021/3/6 3:8:2` it will write `2021/03/06 03:08:02`.
while True:\r
lcd.clear()\r
time = utime.localtime()\r
while True:\r
lcd.clear()\r
time = utime.localtime()\r
- lcd.putstr("{year}/{month}/{day} {HH}:{MM}:{SS}".format(\r
- year=str(time[0]), month=str(time[1]), day=str(time[2]),\r
- HH=str(time[3]), MM=str(time[4]), SS=str(time[5])))\r
+ lcd.putstr("{year:>04d}/{month:>02d}/{day:>02d} {HH:>02d}:{MM:>02d}:{SS:>02d}".format(\r
+ year=time[0], month=time[1], day=time[2],\r
+ HH=time[3], MM=time[4], SS=time[5]))\r
if count % 10 == 0:\r
print("Turning cursor on")\r
lcd.show_cursor()\r
if count % 10 == 0:\r
print("Turning cursor on")\r
lcd.show_cursor()\r