I have groovepi+ board. I have followed this tutorial to install all the librares.
When I run sudo i2cdetect -y 1 I can see the 04 output which means my Raspberry is able to detect the GrovePI.
I have as well installed the python package. Pip freeze returns grovepi==0.0.0 as one of the packages.
My sensor is attached to A0. It’s blue light is on.
But when I try to run:
sudo python grove_air_quality_sensor.py
I get the following error:
Traceback (most recent call last):
File “grove_air_quality_sensor.py”, line 51, in
sensor_value = grovepi.analogRead(air_sensor)
File “/home/pi/Projects/GrovePi/Software/Python/grovepi.py”, line 226, in analogRead
return number * 256 + number
TypeError: ‘int’ object has no attribute ‘getitem’
I am totally stuck so any help would be sincerely appreciated.
Thank you in advance.