C# IOIO and I2C devices
The IOIO C# library on GitHub now has basic I2C support. Protocol support and resource management is lifted from the Java library. The upper API is message based rather than object based. TWI/I2C/SPI is managed via outbound messages. Data from I2C devices and message acknowledgements from the IOIO come back asynchronously via inbound Messages. Hardware This was tested with an IOIO V1, Bluetooth module, a JeeLabs Expander Plug and an old Computer power LED. I2C device The Expander Plug is based on the MicroChip MCP23008 port expander. Programming examples are available on the Jee Labs web site. The Microchip web site has the chip programming guide. The LED assembly already had a current limiting resistor. I just plugged it in across the "+" pin on the expansion port and the port pin next to the power pin. The port expander default address is 0x20. It has 10 registers that control behavior and transfer data. ...