I need to use Arduino UNO to receive commands from Raspberry Pi (it will be used on quadcopter - RPi is wireless receiver) but also I need to connect Arduino with some modules (e.g. MPU6050) which are also communicating at I2C.
There is only one I2C on Arduino UNO (I suppose).
Can you pls give me some hints how to overcome this?
I2C is a bus. Each I2C device has SDA (data) and SCL (clock) pins. All of the SDA pins connect together and all the SDApins connect together. Be sure to have the required pull up resistors installed.
Once more question: How can I overcome collision on I2C bus when MPU6050 Accel+Gyro data are readed on Arduino and message from Raspberry Pi is sending? Both are working alone but together it crash and Arduino must be restarted.
Here is some solution Arduino : howto master to master I2C | Blog Michael BOUVY but it's not working for me. It seems like Raspberry interrupt clock on I2C during the data transmission between Arduino and MPU6050. I'm using I2Cdev on Raspberry and there isn't function to chceck if i2c is free.
I don't have any pull ups becouse MPU6050 is powered from Raspberry Pi 3.2V
Well it seems there is no trivial solution becouse Raspberry Pi can't work as slave Becouse of that I thing there must be used one IO pin used indicating that Arduino is ready to read from Raspberry. Hope it will work