dhylands / python_lcd

Python based library for talking to character based LCDs.
MIT License
298 stars 116 forks source link

Fix #36 #39

Closed clach04 closed 2 years ago

clach04 commented 2 years ago
clach04 commented 2 years ago

Here is what the new failure looks like if sub-second sleep is missing:

Traceback (most recent call last):
  File "my_demo.py", line 40, in <module>
    lcd.custom_char(0, happy_face)
  File "/home/pi/py/python_lcd_clach04/lcd/lcd_api.py", line 170, in custom_char
    self.hal_sleep_us(40)
  File "/home/pi/py/python_lcd_clach04/lcd/lcd_api.py", line 208, in hal_sleep_us
    time.sleep_us(usecs)  # NOTE this is not part of Standard Python library, specific hal layers will need to override this
AttributeError: module 'time' has no attribute 'sleep_us'