GrovePi+ Starter Kit, IOError with LED brink tutorial


#1

Hello,

I’m just starting with GrovePi+ Starter Kit with Raspberry Pi B+, and trying the "LED brink tutorial! as follows:
http://www.dexterindustries.com/GrovePi/projects-for-the-raspberry-pi/raspberry-pi-led-tutorial/

But, the result of python script is as follows

pi@raspberrypi ~/MCC/GrovePi/Software/Python $ sudo python grove_led_blink.py 
Traceback (most recent call last):
  File "grove_led_blink.py", line 12, in <module>
    from grovepi import *
  File "/home/pi/MCC/GrovePi/Software/Python/grovepi.py", line 30, in <module>
    bus = smbus.SMBus(1)
IOError: [Errno 2] No such file or directory

Also, the result of checking i2c is as follows

pi@raspberrypi ~/MCC/GrovePi/Software/Python $ sudo i2cdetect -y 1
Error: Could not open file <code>/dev/i2c-1' or</code>/dev/i2c/1': No such file or directory
pi@raspberrypi ~/MCC/GrovePi/Software/Python $ sudo i2cdetect -y 0
Error: Could not open file <code>/dev/i2c-0' or</code>/dev/i2c/0': No such file or directory

Do you have any idea about the possible cause? Thanks.


#2

Have you installed smbus and/or i2c-tools? To do this run :

sudo apt-get install python-smbus
sudo apt-get install i2c-tools

Also ensure you have installed i2c support for the ARM core and linux kernel. To do this run :

sudo raspi-config

then go to

Advanced Options

Then click

I2C

at this point it will ask you:

Would you like the ARM I2C interface to be enabled

click yes on the next two screens and reboot.


#3

Hi, Exadon

Thank you for your so quick reply.
I can confirm LED blink with your pointed steps!


#4

You are welcome Takeyuki :slight_smile:

Enjoy your GrovePi!