Closed
Description
If you pass True, the value is set to 0 (False) turning the backlight off and you must pass False to turn it on.
Additionally, a quick review of the init function defaults the self.backlight member to None which will cause an exception if you don't pass in the pin and attempt to call set_backlight since None has no 'value' member.
def set_backlight(self, lighton):
""" Set lighton to turn the charLCD backlight on.
:param lighton: True to turn backlight on, False to turn off
"""
if lighton:
self.backlight.value = 0
else:
self.backlight.value = 1
Metadata
Metadata
Assignees
Labels
No labels