[RGB LCD] Error 121

grovepi

#1

We have started with a training/course and all got a Pi B3+ with the GrovePi starter kit.
Running with Raspbian and we alle seem to get an Error 121 when running the LCD scripts.

i2cdetect -y 1 gives us different outputs on the last line. Sometimes none, sometimes 70, someties 74 and 75.
Any help on this?


#2

Hi @tijmenschoemaker,

Can you tell us what LCD scripts you are running, precisely?
And at the same time, tell us what devices/sensors you have connected to the GrovePi or to the Raspberry Pi for that matter?

Thank you!


#3

We were running with temp + hum sensor, 2 leds and running the standard python grove_rgb_lcd scripts.

-edit-
Just turned on my pi again.
i2cdetect -y 1 before execution of script:

root@pi-tijmen:/home/pi/Dexter/GrovePi/Software/Python# i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          03 -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- 38 -- -- -- -- -- 3e --
40: -- -- -- -- -- 45 46 -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- 62 -- -- -- -- -- -- -- -- -- -- -- -- --
70: 70 -- -- -- -- -- -- --
root@pi-tijmen:/home/pi/Dexter/GrovePi/Software/Python# i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          03 -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- 38 -- -- -- -- -- 3e --
40: -- 41 42 -- 44 45 -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- 62 -- -- -- -- -- -- -- -- -- -- -- -- --
70: 70 -- -- -- -- -- -- --

This time, with just the 7" LCD, GrovePi board en the RGB_LCD. Ran the example.py from the software folder:

root@pi-tijmen:/home/pi/Dexter/GrovePi/Software/Python/grove_rgb_lcd# python example.py
Traceback (most recent call last):
  File "example.py", line 43, in <module>
    setRGB(c,255-c,0)
  File "/home/pi/Dexter/GrovePi/Software/Python/grove_rgb_lcd/grove_rgb_lcd.py", line 46, in setRGB
    bus.write_byte_data(DISPLAY_RGB_ADDR,4,r)
  File "/usr/local/lib/python2.7/dist-packages/smbus_cffi-0.5.1-py2.7-linux-armv7l.egg/smbus/util.py", line 59, in validator
    return fn(*args, **kwdefaults)
  File "/usr/local/lib/python2.7/dist-packages/smbus_cffi-0.5.1-py2.7-linux-armv7l.egg/smbus/smbus.py", line 145, in write_byte_data
    raise IOError(ffi.errno)
IOError: 121

Display does light up and says: Hellow World LCT Test but then the script exits

i2cdetect -y 1 after execution of the script:

root@pi-tijmen:/home/pi/Dexter/GrovePi/Software/Python/grove_rgb_lcd# i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          03 -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- 38 39 -- -- -- -- 3e --
40: -- -- -- -- -- 45 -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- 62 -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --


#4

@RobertLucian
running the lcd.sh in Shell folder also errors:

root@pi-tijmen:/home/pi/Dexter/GrovePi/Software/Shell/Grove - LCD RGB Backlight# ./lcd.sh
Error: Write failed
Error: Write failed
Error: Write failed


#5

Are you somehow running multiple scripts at the same time that access the same I2C device?