LCD not working with new grovePi kit

grovepi

#1

I’ve one old kit (with a raspberry pi 3b), and I’ve bought a new kit (with raspberry Pi 3 b+).
The led example is working fine but when I try to use lcd I’m always getting errors.
I’m using python and the example provided:

I’ve installed last raspbian and followed the startup scripts.
here the stacktrace:


pi@raspberrypi:~/Desktop/GrovePi/Software/Python/grove_rgb_lcd $ python example.py
Traceback (most recent call last):
  File "example.py", line 38, in <module>
    setText("Hello world\nLCD test")
  File "/home/pi/Desktop/GrovePi/Software/Python/grove_rgb_lcd/grove_rgb_lcd.py", line 56, in setText
    textCommand(0x01) # clear display
  File "/home/pi/Desktop/GrovePi/Software/Python/grove_rgb_lcd/grove_rgb_lcd.py", line 52, in textCommand
    bus.write_byte_data(DISPLAY_TEXT_ADDR,0x80,cmd)
  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

I’ve launched :


pi@raspberrypi:~/Desktop/GrovePi/Software/Python $ sudo i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          03 04 -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- 62 -- -- -- -- -- -- -- -- -- -- -- -- --
70: 70 -- -- -- -- -- -- --

this returns values when in the last two lines. is it relevant?

Could it be a fix for my problem? Pre-Release of GrovePi's Firmware v1.3.0 Open to Testers

I’m open to use a beta, if we are quiet sure it should not cause additional problems.
Is it still possible to downgrade in case of problems?

Could you help me to fix my problem? Do you need additional data for further analysis?

Sorry for the long post with lots of questions

EDIT:

I’ve attached 3xLCD into I2C ports (1 for each available port) and magically it’s working fine, if I detach 1 LCD it stop working again. any idea of it?
By the way I cannot go with 3 LCD, it could not be considered the solution…


#2

Hi @marco.porru,

Hmm. What happens if you run the script with elevated permissions? Like sudo python example.py?

And what startup scripts have you followed? I suppose it’s this one in particular:

curl -kL dexterindustries.com/update_grovepi | bash

Thank you!


#3

Hi @RobertLucian, thanks for the answer.
I’ve used the mentioned script:

curl -kL dexterindustries.com/update_grovepi | bash

I’ve tried now to elevate rights, but I’ve no changes, still an exception (the same exception)


#4

Hi @marco.porru,

Let’s back up for a second. Does the following script work for you?

import grovepi
version = grovepi.version()
print(version) 

Thank you!


#5

Hi @RobertLucian, here is the output:


pi@raspberrypi:~ $ python test2.py
1.220.255


#6

Hi @marco.porru,

That’s a sign the firmware on the GrovePi is not present or is too old. Let’s flash the firmware manually:

 bash firmware_update.sh

This file called firmware_update.sh should be present in ~/Dexter/GrovePi/Firmware. On the GrovePi repo, it’s located here:

Let me know if flashing the firmware fixes your problem (it most likely will).

Thank you!