First chance to play with Raspberry PI I2C
Hickmat 100000QA3T Visits (3386)
Over Christmas I managed to acquire Beta Boards from Quick2Wire . These boards provide full (and safe) access to the GPIO on the Raspberry PI. Given I've played around with the GPIO quite a bit to do simple sensing and switch, I was really interested in trying out the I2C, SPI and Serial capabilities. Given the port extender provides access to 2 banks of extra GPIO pins (as shown below) I thought the best starting point would be to do some simple LED driving but this time via the I2C.
With the circuits in place I wired them in to the ports and then started testing the code. The supplied multi-counter.py program targets Port B so I needed to do a little bit of research around how to work with the MCP23017 so I could re-work the program to target Port A. This turned out to be very simple The following lines were the key as they set up the registers to target the Port B
So armed with this I took a look through the MCP23017 Datasheet which showed that the registers I needed were 0x12 for the GPIO and 0x01 for the IODIR. So with information I created a copy of the program (inventively named mult
So now I've got that working I think my next step is to try and recreate this using Java and the Pi4j library.