Skip to content

Commit 27b3b72

Browse files
improve right to left example and docs
1 parent f3b7c03 commit 27b3b72

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

docs/EXAMPLES.md

+2
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,12 @@ for _ in text:
8383
# LCD has already been setup, see section "Setup Display"
8484

8585
# set text flow right to left
86+
lcd.set_cursor(col=12, row=0)
8687
lcd.right_to_left()
8788
lcd.print("Right to left")
8889

8990
# set text flow left to right
91+
lcd.set_cursor(col=0, row=0)
9092
lcd.left_to_right()
9193
lcd.print("Left to right")
9294
```

examples/main.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -108,13 +108,15 @@ def print_and_wait(text: str, sleep_time: int = 2) -> None:
108108

109109
# set text flow right to left
110110
lcd.clear()
111+
lcd.set_cursor(col=12, row=0)
111112
lcd.right_to_left()
112113
lcd.print("Right to left")
113114
print_and_wait("Set text flow right to left")
114115

115116
# set text flow left to right
116-
lcd.left_to_right()
117117
lcd.clear()
118+
lcd.set_cursor(col=0, row=0)
119+
lcd.left_to_right()
118120
lcd.print("Left to right")
119121
print_and_wait("Set text flow left to right")
120122

0 commit comments

Comments
 (0)