Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting 'TypeError: 'int' object has no attribute '__getitem__' testing airquality sensor (python) #390

Open
fernandoagarcia opened this issue Mar 7, 2018 · 1 comment

Comments

@fernandoagarcia
Copy link

fernandoagarcia commented Mar 7, 2018

Just got my new GrovePi+ board and I when through the install process using the 'Quick Start' method:

sudo curl -kL dexterindustries.com/update_grovepi | bash

tested the board using:

sudo i2cdetect -y 1

and got the OK with the following result and installed the sensor on the A0 interface:

0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- 04 -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- --

The issue is when running the example test script for the air sensor I have I get a TypeError:

Traceback (most recent call last): File "grove_air_quality_sensor.py", line 46, in <module> sensor_value = grovepi.analogRead(air_sensor) File "/home/pi/Dexter/GrovePi/Software/Python/grovepi.py", line 227, in analogRead return number[1] * 256 + number[2] TypeError: 'int' object has no attribute '__getitem__'

Everything lights up fine the board is fine. I think the issue is the script itself or maybe a version issue. Any help would be great. TY

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant