===== How to setup and use I2C and SPI on RPi ===== ==== Guides ==== [[https://learn.sparkfun.com/tutorials/raspberry-pi-spi-and-i2c-tutorial/all|Sparkfun]] [[https://learn.adafruit.com/adafruit-4-channel-adc-breakouts/|Adafruit]] ==== Enable Interfaces ==== Make sure I2C and/or SPI are turned on sudo raspi-config ==== Install Software ==== [[http://wiringpi.com/|WiringPi]] is used to program ([[http://wiringpi.com/download-and-install/|download]]) ([[https://projects.drogon.net/raspberry-pi/wiringpi/spi-library/|docs]]) I2C tools sudo apt-get install -y i2c-tools i2cdetect program will probe all the addresses on a bus. Read and write registers using the i2cget, i2cset and i2cdump commands. i2cdetect -Y 1