Need help to control LCD screen with Raspberry and Python -
i have lcd connected raspberry , controled python code
i'd write word (like typewriting), letter after letter
i've tried different possibility no success. , i'm stucked. need help
here code control writing on lcd :
# send centred test lcd_byte(lcd_line_1, lcd_cmd) lcd_string("sentence one",2) lcd_byte(lcd_line_2, lcd_cmd) lcd_string("sentence two",2) lcd_byte(lcd_line_3, lcd_cmd) lcd_string("sentence three",2) lcd_byte(lcd_line_4, lcd_cmd) lcd_string("sentence four",2)
not tested , guess should started
import time def typewriter_like(sentence, lcd_line, delay=1): i,letter in enumerate(sentence): lcd_byte(lcd_line, lcd_cmd) lcd_string(sentence[:i+1], 2) time.sleep(delay) # use typewriter_like("sentence one", lcd_line_1)
Comments
Post a Comment