im working on a project which requires alo i/o pins. For that reason i bought a pcf8574P 8bit I/O expander which uses the I2C protocol. The problem is how to combine the Rasp PI and the arduino.
For example:
I want the Rasp to send data to the Arduino. Currently i'm using serial but i wanted to switch over to I2C because it better, simpler, and faster however how can i use 2 I2C when the Atmega 328P supports only 1 I2C bus?
The plan goes like this:
The PI is master of the arduino and it sends the data. Arduino is the slave
Arduino is master of the IO expander and the expander is slave
Possible solutions:
- Use the Serial protocol to send the data and use the I2C for the expander
- Make the arduino master of the PI and the expander which i'm not sure if its possible