A version of Ladyada's MCP23008 8-bit I2C IO Expander library, ported for use on Spark Core.
Device OS Version:
This table is generated from an automated build. Success only indicates that the code compiled successfully.
This content is provided by the library maintainer and has not been validated or approved. This is very much beta, it seems to work fine but its not optimized and doesn't currently suport the interrupt capability of the chip
Currently it can do: setting pin directions, inputs and outputs and turning on/off the pull-up resistors
To use: Connect pin #1 of the expander to D1 (i2c clock) Connect pin #1 to 5V (using a pullup resistor ~4K7 (4700) ohms) Connect pin #2 of the expander to D0 (i2c data) Connect pin #2 to 5V (using a pullup resistor ~4K7 (4700) ohms) Connect pins #3, 4 and 5 of the expander to ground (address selection) Connect pin #6 and 18 of the expander to 5V (power and reset disable) Connect pin #9 of the expander to ground (common ground) Pins 10 thru 17 are your input/output pins
Check the datasheet for more info: http://ww1.microchip.com/downloads/en/DeviceDoc/21919b.pdf
Enjoy and send pull requests!