Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

backlight control doesn't work #7

Open
julianrendell opened this issue May 19, 2021 · 1 comment
Open

backlight control doesn't work #7

julianrendell opened this issue May 19, 2021 · 1 comment

Comments

@julianrendell
Copy link

Thanks for this library- I'm finding it easy to use!

I'm just playing with my new toy (Pi Pico) + pcf8574 i2c module, using the latest stable CircuitPython.

I tried to turn off/on the back light but got _BACKLIGHT_VALUES undefined erro in i2c_pcf8574_interface.py.

I modified it to:

    @backlight.setter
    def backlight(self, value):
        self._backlight_pin_state = I2CPCF8574Interface._BACKLIGHT_VALUES[value]
        self._i2c_write(self._backlight_pin_state)

but now get:

  File "/lib/lcd/lcd.py", line 158, in set_backlight
  File "/lib/lcd/i2c_pcf8574_interface.py", line 71, in backlight
  File "/lib/lcd/i2c_pcf8574_interface.py", line 96, in _i2c_write
RuntimeError: Function requires lock

My code:

lcd.set_backlight(False)

I'm new to i2c via CircuitPython, so not sure what to try next.

@dhalbert
Copy link
Owner

I'll fix this -- thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants