A C++ object to control the Microchip MCP23S17 16-bit IO Exapander. For the Arduino Platform.
Mcp23s17 is a simple object which mimics the typical Arduino functions for digital reads, digital writes, to set output pins etc. To use, we just wire up the SPI bus and instantiate a new object. By default, the chip powers up with all pins configured as high-impedance inputs. This library may also work with other AVR microcontroller devices (again, after some tweaking). This library was tested on Arduino UNO.
Pretty much everything is explained within the example sketch file. Open Mcp23s17Example.pde in Arduino IDE and upload it to your microcontroller device. Check that all of the SPI interface pins are connected OK for your model. There will be some tweaking needed for the Arduino MEGA family of devices.
Dreamcat4
Download the latest version of the Mcp23s17 library from GitHub. Includes example .pde file.
\* Other versions of Arduino Spi library (such as `SPI.h`) wont work / wernt tested.