Saturday, December 13, 2014

Enable I2C and install tools on Raspberry Pi

To enable I2C and install tools on Raspberry Pi, such that you can develop program to communicate with I2C devices.

  • $ sudo apt-get install i2c-tools
  • $ sudo apt-get install libi2c-dev
  • $ sudo nano /etc/modprobe.d/raspi-blacklist.conf
    comment the line of
    #blacklist i2c-bcm2708
  • $ sudo nano /etc/modules
    add the lines:
  • reboot
After reboot, run i2c-tools to test
run the command with -1 option for rev 2 board, or -0 for rev 1 board.
$ sudo i2cdetect -y 1
$ sudo i2cdetect -y 0

Enable I2C on Raspberry Pi running Raspbian Jessie

Communication between Raspberry Pi and Arduino via I2C, using Python.
Raspberry Pi send block of data to Arduino using I2C.

1 comment:

Eindringling said...

I do not know why but there is nothing inside the raspi-blacklist.conf file