Skip to content

Instantly share code, notes, and snippets.

@schnipdip
Created October 5, 2020 16:22
Show Gist options
  • Save schnipdip/2fb09a0f542c687862d773198929bd94 to your computer and use it in GitHub Desktop.
Save schnipdip/2fb09a0f542c687862d773198929bd94 to your computer and use it in GitHub Desktop.
def move_left(self):
"""Moves displayed text left one column.
The following example scrolls a message to the left off the screen.
.. code-block:: python
import time
import board
import busio
import adafruit_character_lcd.character_lcd_i2c as character_lcd
i2c = busio.I2C(board.SCL, board.SDA)
lcd = character_lcd.Character_LCD_I2C(i2c, 16, 2)
scroll_message = "<-- Scroll"
lcd.message = scroll_message
time.sleep(2)
for i in range(len(scroll_message)):
lcd.move_left()
time.sleep(0.5)
"""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment