Sound Sensor has issues when run with a LCD Screen


#1

Hi - I am running GrovePi+ along with a 3.5" LCD screen [http://www.waveshare.com/product/3.5inch-RPi-LCD-A.htm] [http://www.waveshare.com/wiki/3.5inch_RPi_LCD_(A)#FAQ]. The setup allows me to run the python script without needing a monitor or network to run the command. What i notice is that while the grove_sound_sensor.py runs fine when connected to HDMI or over SSH, when I run the command with the LCD screen having the display, the sensor only returns an Error. With the LCD i2cdetect works fine as well as the grove_led_blink.py samples work as expected.

I already upgraded the firmware to 1.2.5 but have the same issue.

Any idea’s?


#2

Some error details -
pi@raspberrypi:~/Desktop/GrovePi/Software/Python sudo python grove_sound_sensor.py Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error ('sensor_value =', 109) ('sensor_value =', 65535) ('sensor_value =', 163) ('sensor_value =', 65535) Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error ('sensor_value =', 188) ^CTraceback (most recent call last): File "grove_sound_sensor.py", line 69, in <module> time.sleep(.5) KeyboardInterrupt pi@raspberrypi:~/Desktop/GrovePi/Software/Python


#3

Error’s seem to be the following when I add some more debug in the code:

(‘Error’, 5, ‘Input/output error’)


#4

Hi Sanjay,
It looks like the LCD is causing the GrovePi to stop working. There are 2 ways by which you can dirupt the communications to the GrovePi. 1) take over the I2C lines 2) Take over the SPI reset. I have seen LCD touch screens in the past take over the I2C channel for the touch screen, but with the one that you are using, it looks like it does take over SPI reset. So if the Pi sends a signal to the SPI, reset or just hold that, it might make the GrovePi stop working. There is no great way to avoid it. From the specs of the datasheet, pin 24 CE0 is being used as a chip select by the LCD which might stop the GrovePi to work when the LCD is working. There is no easy way around this, maybe you could use a ribbon cable to break out the connections and give grovePi all the connection except the CE0, so that it can work normally.

-Karan