i2c communication


I hope you guys can help, and thank you in advance for your advice. I’m new to Python and Micro Python. I’m working on an interesting project, I would like to run a RPi4b as a master and 2 x Pico’s to run as Slaves. Connection will be via the I2c pins, clock and data lines.

Please see attached image of part of the circuit diagram so you get a sense of what I am trying to do. Essentially, I would like to connect 3 stepper motors, 2 load cells and 1 x servo motor to Pico 1. Pico 2 will be identical configuration as Pico 1.

I understand that we will use i2c connection, but curious (as I am still learning) how this would be executed in the codebase. Does the code base for the full system live / reside on the Rpi4 and the addresses for the pins on the subsystem referenced in this code?, or is the code for the subsystem to reside on the pico’s in micro python and then referenced as a package to the Rpi4?

I hope this makes sense, I welcome clarification questions if necessary and thank you for your guidance and support.



This is not the place to ask this question. You really need to ask this on your Rbi4 support site.