Hi guys,
First of all apologies if this question has been answered before, I tried searching the forum but didn't find a clear answer. I am new to axoloti but I am experienced with electronics, Pure Data and C coding, Arduino etc. so this questions is more about specific Axoloti implementation.
I am connecting 8 buttons and 8 LEDs to axoloti via i2c, using the MCP23017-E/SP chip. I have used this setup plenty of times with arduino and I am confident about the hardware side of things.
I am having difficulty figuring out how to setup Axoloti on the software side. I added the i2c config object and I hooked up the chip to PB8 and PB9 pins. I'd like to get 8 boolean outputs (from the switches) and 8 boolean inputs (for the LEDs). What script code should I use to communicate with the chip? Basically, how to setup GPA ports to read and GPB ports to write and how to read/send data between them and axoloti?
I am also using two MCP3208 chips to read 16 pots and the setup was quite straightforward, I just modified the example code from the forum. So if you could point me in the right direction regarding the i2c communication with the MCP23017 that would be fantastic.
Thank you.