What is after the first 1. 2. 3. 4. steps ?
567.dk

RPI Info RPI 1-Wire ® RPI 1-Wire ® Temperature (DS18B20) RPI i2c. RPI i2c. 16 LED Output (MCP23017)

RPI i2c bus 16 I/O (mcp23017)


This guide shows how to get 16 I/O with 1 MCP23017 and a Raspberry pi - Here only used as output !!

PCS Item Calculated Price Price bulk buy
1 MCP23017 2.49 E-bay US $ 2.49 with shipping to Denmark (July 2013)
16 220Ω Resistor 0.07 E-bay US $ 0,07 (@200 pcs US $ 0.91) with shipping to Denmark (July 2013)
16 LED 3 mm 0.15 E-bay US $ 0,15 (@500 pcs US $ 4.55) with shipping to Denmark (July 2013)


Recommended standard reusable hardware

PCS Item Calculated Price Price bulk buy
1 Raspberry PI Type B and power 72,54 US $ 72.54 with shipping to Denmark (July 2013)
1 4 GB SD card 5.30 US $ 5.30 with shipping to Denmark (July 2013)
1 Wire Jumper Cable 7.49 US $ 7.49 with shipping to Denmark (July 2013)
3 BREADBOARD SYB-120 700 TIE-POINTS 5.67 E-bay US $ 5.67 (@1 pcs US $ 1.89) with shipping to Denmark (July 2013)


Use donate button if you like my guides, or if you want a new guide ( See missing work ).

Datasheet i2c 16-Bit I/O Expander (MCP23017)


Connect the circut, as shown. - If you what multible MCP23017, you shoot set the address, by pin 15, 16, 17
some text

some text


Start with prepare a Raspberry pi with supported os - my prefered is Raspbian “wheezy” Direct download my server (2013-05-25)

You can find my bref installation guide in RPI Info


■SSH into your Raspberry Pi
■Open the raspi-black-list.conf file using the following command : “sudo vi /etc/modprobe.d/raspi-blacklist.conf”
■Comment out the “blacklist i2c-bcm2708” entry by putting a hash # sign in front of it. So it looks like “#blacklist i2c-bcm2708”
■At this point you can also enable SPI device access by putting a hash # sign in front of “blacklist spi-bcm2708“.

■You then need to save your changes (:wq in vi) and reboot using the “sudo reboot” command.
■Now every time you reboot you will still need to perform two things to enable I2C:
■Type “sudo modprobe i2c-dev” and
■Type “sudo chmod o+rw /dev/i2c*“



Sample bash code for fast run !!