Want to use I2C for something else


#1

First post here, really happy I found Roboteurs. I got SlushEngine working for a single stepper on a Pi HAT (which is all I need for my project). However I want to use the I2C pins to drive some MCP23017 chips for GPIO expansion. Does SlushEngine commandeer the I2C pins on the Raspberry Pi, or is I2C available for me to use? If the pins are available, obviously I’d have to solder some more breakout pin headers onto the Pi HAT in order to use I2C. Thanks!!


#2

I guess everyone is on vacation…


#3

Hi Kobin,

I’m not familiar with the SlushEngine Pi HAT, but it seems like it has a UEXT connector which should support I2C. You’ll need to use the RPI to instruct the SlushEngine Pi HAT to use the UEXT connector. There may be some coding examples on this forum, and the coding may be similar to this,

board = Slush.sBoard()
somVar = board.getIOState(port, pinNumber)
board.setIOState(port, pinNumber, state)

This should give you a starting point,