The examples in this guide are no longer supported. Check out the MCP23xx guide for CircuitPython and Python usage:
While the Raspberry Pi packs and awful lot of punch for the price, and it's fairly flexible where HW expandability is concerned, there are situations where you might want a bit more basic digital IO.  Thankfully, it's an easy problem to solve with an I2C-enabled device like the MCP23008 (for an extra 8 GPIO pins) or the MCP23017 (for an extra 16 GPIO pins).  This tutorial will show you how you can get up and running quickly with either of these chips.

What You'll Need

If you're not using Occidentalis, Adafruit's own Raspberry Pi distro, you'll also need to make sure your Pi is configured for I2C before running through our tutorial at (If you're using Occidentalis, I2C is already enabled, though, and you're ready to go!)

This guide was first published on Oct 26, 2012. It was last updated on Mar 08, 2024.

This page (Overview) was last updated on Mar 08, 2024.

Text editor powered by tinymce.