LCD Error: OSError: 121


i have a new grovePi and the code runs some seconds and
then comes the OSError: 121 - and it seems, that there
are problems with the Grove-LCD RGB.

below is the error message.

i only show data on the LCD but this stops after some seconds.
i try to use it for the omxplayer with timers.

i am using Raspbian GNU/Linux 9 (stretch) Linux rpi_grove 4.14.98-v7+
the newest firmware 1.3

any solutions?


PS all the time when i reboot the rPI the red light (reset) is also on.
so i must always execute: avrdude -c gpio -p m328p
i tried 3 different power supplies and also a second grovePi board - but no success!


Exception in thread Thread-16:
Traceback (most recent call last):
  File "/usr/lib/python3.5/", line 914, in _bootstrap_inner
  File "/usr/lib/python3.5/", line 1180, in run
    self.function(*self.args, **self.kwargs)
  File "./", line 102, in doVideo
  File "/usr/local/lib/python3.5/dist-packages/grovepi-1.0.4-py3.5.egg/", line 56, in setText
    textCommand(0x01) # clear display
  File "/usr/local/lib/python3.5/dist-packages/grovepi-1.0.4-py3.5.egg/", line 52, in textCommand
  File "/usr/local/lib/python3.5/dist-packages/smbus_cffi-0.5.1-py3.5-linux-armv7l.egg/smbus/", line 59, in validator
    return fn(*args, **kwdefaults)
  File "/usr/local/lib/python3.5/dist-packages/smbus_cffi-0.5.1-py3.5-linux-armv7l.egg/smbus/", line 145, in write_byte_data
    raise IOError(ffi.errno)
OSError: 121

Are you locking the access to the resource (I2C bus and device) every time you initiate a set of transfers (like analogRead, digitalWrite, etc)?

The library for the GrovePi is not thread-safe, so you have to implement your own mechanisms for sharing the I2C device resource across multiple threads.

Thank you!