Broken or what?

Hi,

Just got my grovepi today and after i installed depencies i tried to read temp/hum sensor from analog pin and all i get is error.

Script is very simple, I just try to read analog 1 and print it out:

import smbus
import time
import grovepi
bus = smbus.SMBus(0)

i=grovepi.analogRead(1)
print i

And all I get is IOError…

Traceback (most recent call last):
File “temp2.py”, line 13, in <module>
i=grovepi.analogRead(1)
File “/home/pi/work/GrovePi/Software/Python/grovepi.py”, line 39, in analogRead
bus.write_i2c_block_data(address,1,aRead_cmd+[pin,0,0])
IOError: [Errno 5] Input/output error

Any ideas?

Can you run i2cdetect -y 0 and i2cdetect -y 1 with the GrovePi attached and post the results.

Thanks,
Karan

I did that and connection seemed ok if i understood documentation right.

i2cdetect -y 0

 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: – -- – -- – -- – --

i2cdetect -y 1

 0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f

00: – -- – -- – -- – -- – -- – -- –
10: – -- – -- – -- – -- – -- – -- – -- – --
20: – -- – -- – -- – -- – -- – -- – -- – --
30: – -- – -- – -- – -- – -- – UU – -- – --
40: – -- – -- – -- – -- – -- – -- – -- – --
50: – -- – -- – -- – -- – -- – -- – -- – --
60: – -- – -- – -- – -- – -- – -- – -- – --
70: – -- – -- – -- – --

Hi,
Can you do one try one thing. Open grovipi.py in the editor and change bus = smbus.SMBus(1) at line 5 to bus = smbus.SMBus(0).

Hope that this helps and sorry for the inconvenience.

Hi,

Did that earlier yesterday, but that didn’t help either…

Gives same IOError in every combination while trying to read or write any pin(s)

IOError: [Errno 5] Input/output error

Sorry, misread your post. I didn’t change that from grovepi.py file before, now when i did it seems to work!

Thank You so much! :slight_smile:

Great to hear that your problem is solved.

We are working on a firmware and software update and will release it in the coming days. It should solve all these problems and add some new features too.

Hello,

Same problem here using Grove Pi with a new brand Raspberry Pi B+ card. Most of the time showing IOError, sometimes (e.g. buzzer python example) shows the expected ‘start/stop’ words and IOError and not sound at all.

BTW I’ve isolated the GrovePi card pins that could be touching the LAN and USB ports of the Raspberry Pi B+

Any Idea?

Regards

Hi maganj3m,
Can you check a few things:

  • The Grove Pi is placed on the top leftmost pins of the Model B+ header. Please check this: http://www.raspberrypi-spy.co.uk/2014/07/raspberry-pi-b-gpio-header-details-and-pinout/ . The GrovePi should be placed on the header starting at the 5V pin.
  • Are you using a Dexter Industries SD card or image with all the softwares setup.
  • Please run i2cdetect -y 0 and i2cdetect -y 1 and post the output.
  • If possible, can you post some good pictures of the setup that you are using right now.
  • Double check that the GrovePi is not making an electrical contact with the Model B+.

-Karan