Skip to content
Prev Previous commit
Next Next commit
Update charlcd_mono_simpletest.py
  • Loading branch information
profbrady authored Apr 11, 2019
commit 3d4340cef0d25f6834f4c9d6eb68ccef86560644
27 changes: 0 additions & 27 deletions examples/charlcd_mono_simpletest.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,40 +25,14 @@
lcd.backlight = True
# Print a two line message
lcd.message = "Hello\nCircuitPython"
# Wait 3s
time.sleep(3)
# Print two line message with cursor set to column 2
lcd.clear()
lcd.cursor_position(2, 0)
lcd.message = "Hello\nCircuitPython"
# Wait 5s
time.sleep(5)
lcd.clear()
# Stars across the display one a time on second row from L to R
# using cursor_position
for i in range(16):
lcd.cursor_position(i, 1)
lcd.message = "*"
time.sleep(0.1)
lcd.clear()
# Print two line message right to left
lcd.text_direction = lcd.RIGHT_TO_LEFT
lcd.message = "Hello\nCircuitPython"
# Wait 5s
time.sleep(5)
# Print two line R to L message with cursor set to column 3
lcd.clear()
lcd.text_direction = lcd.RIGHT_TO_LEFT
lcd.cursor_position(3, 0)
lcd.message = "Hello\nCircuitPython"
# Wait 3s
time.sleep(3)
# Stars across the display one a time on second row from R to L
lcd.clear()
for i in range(16):
lcd.cursor_position(i, 1)
lcd.message = "*"
time.sleep(0.1)
lcd.clear()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's remove the lcd.clear() just to keep the examples consistent.

# Return text direction to left to right
lcd.text_direction = lcd.LEFT_TO_RIGHT
Expand All @@ -77,7 +51,6 @@
lcd.blink = False
lcd.clear()
# Create message to scroll
lcd.cursor_position(5, 0)
scroll_msg = '<-- Scroll'
lcd.message = scroll_msg
# Scroll message to the left
Expand Down