Can't get grovepi_blink.py to work

Can’t get the grovepi_blink.py to work. All installation done on Whezzy 7th Jan 2014 build, user “pi” used.

Following -> http://www.dexterindustries.com/GrovePi/get-started-with-the-grovepi/setting-software/

Check python works :
pi@raspberrypi ~/GrovePi/Software/Python $ python
Python 2.7.3 (default, Jan 13 2013, 11:20:46)
[GCC 4.6.3] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.
>>>
ctrl-D out of python

pi@raspberrypi ~/GrovePi/Software/Python python grovepi_blink.py Traceback (most recent call last): File "grovepi_blink.py", line 3, in <module> import grovepi File "/home/pi/GrovePi/Software/Python/grovepi.py", line 21, in <module> bus = smbus.SMBus(1) IOError: [Errno 13] Permission denied pi@raspberrypi ~/GrovePi/Software/Python

Problem ID is 2935. I ran https://github.com/DexterInd/BrickPi/blob/master/Setup%20Files/Support/troubleshooting.sh

Is there a troubleshooting.sh going to be produced for the GrovePi as well ?

Hi kwiatks,
Try running the script as root.
Use sudo grovepi_blink.py

I’ll have a look at the troubleshooting log to see if anything else is wrong or not. We’ll update the troubleshooting file for the GrovePi soon.

Thanks,
Karan

Fix was :
sudo adduser pi i2c

Hi Kwiatks,
Thanks for letting us know the solution.

Hi,

I was having trouble with my kit also but I found a solution.

First, the download has changed. Many of the docs here refer to grovepi_blink.py, but for me, this doesn’t exist. Instead, there is a grove_led_blink.py. None of the grovepi names exist in the Python folder anymore. So I used that one.

Next is sort of crazy. Perhaps somebody can explain. The grovepi kit I have includes a green, blue, and red LED and they are shipped in a little green bag with three parts. The cable, the led, and the board. You have to mount the led yourself. Normally these have a positive and a negative terminal with one lead being longer than the other. Well, that’s not the case. Anybody know how to tell the direction other than by trial and error?

Hope that helps somebody. 50/50 chance of getting it right and no harm done either way, but the led will simply not light unless you get it turned correctly.

-Jason

Hey,
Thanks a lot ofr letting us know about the error in the GrovePi docs. We’ll update the docs asap.

The LED’s that we had usually had the positive side with a longer leg. I think that the ones you got with legs of equal length might have slipped through QA on Seeedstudio’s side. The easiest way to find out the polarity would be by trial and error. We’ll also update the docs so that people are not confused and do try both the sides.

-Karan

Ok, so I must be daft. All I am getting is IOError.

This is what I get from sudo i2cdetect -y 1

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

Hey,
0x08 is the address used by the GoPiGo, can you just make sure that you are using running the firmware update from the GrovePi folder and that you have updated the GrovePi folder from the github repository.

-Karan