Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
ip_selctor [2014/12/30 17:44] admin |
ip_selctor [2014/12/30 20:55] admin |
||
---|---|---|---|
Line 1: | Line 1: | ||
---- | ---- | ||
**IP Selctor** | **IP Selctor** | ||
+ | with the MCP23008 and MCP23017 | ||
---- | ---- | ||
- | + | **Preparing the RPi for I2C:**\\ | |
- | **MCP23008 and MCP23017**\\ | + | |
[[http:// | [[http:// | ||
+ | [[http:// | ||
+ | Open the file:\\ | ||
+ | $ sudo nano / | ||
+ | Comment out:\\ | ||
+ | #blacklist i2c-bcm2708 | ||
+ | Open the file:\\ | ||
+ | $ sudo nano / | ||
+ | Add:\\ | ||
+ | i2c-dev | ||
+ | Load modules:\\ | ||
+ | $ sudo modprobe i2c_bcm2708 | ||
+ | $ sudo modprobe i2c-dev | ||
+ | Check the i2c modules:\\ | ||
+ | $ lsmod | ||
+ | | ||
+ | Module | ||
+ | i2c_dev | ||
+ | i2c_bcm2708 | ||
+ | Install some programs:\\ | ||
+ | $ sudo apt-get update | ||
+ | $ sudo apt-get install i2c-tools | ||
+ | $ sudo apt-get install python-smbus | ||
+ | Check the address:\\ | ||
+ | $ sudo i2cdetect -y 1 | ||
+ | $ sudo i2cdump -y 1 0x20 | ||
+ | |||
+ | **Library: | ||
[[https:// | [[https:// | ||
+ | Download Adafruit libraries: | ||
+ | $ wget https:// | ||
+ | unpack:\\ | ||
+ | $ unzip master.zip | ||
+ | |||
+ |