The project I'm working on involves in total 8 raspberries, one master and all others acting as slaves. The goal is to write to all Pi's and read back their answer.

Communication using the master Rpi and one slave is flawless (accuracy 100% for dummy write/read tests). When adding adding more Rpi's problems start e.g no response/false response. In the latter case the accuracy drops significantly (accuracy under 40%).


gpios 2/3 have been used on the master and gpios 18/19 on the slaves and all have common ground. Additionally, tests have been performed using external pull up resistors 5k to 3V3 for both SCL and SDA, again the problem in communication exists.

Software Implementation

A. PIGPIO library has been used on the slaves' side in order to make them act as I2C slaves addresses used are 0x03 - 0x09. On the master smbus has been used.

B. Another attempt was to execute terminal commands from python (pigs from pigpio) on the master side and use its output and on the slave side the I2C slave device proposed in PIGPIO examples (bsc_arduino.py).

C. smbus2 on the master side and the same python script as in case B.

In all cases attempts to achieve proper write/read accuracy failed.

Has anyone faced the same issues or may have a clue?

  • Does it help to lower the datarate? – Ronny Nilsson Aug 3 '19 at 18:59
  • 1
    Why are you making it hard for yourself. Use ethernet or WiFi to connect your Raspberries. Not I2C. You could even set up one master Raspberry as an access point and connect the others to it. That will be a million times easier than mucking about with I2C. – Dougie Aug 3 '19 at 21:01
  • Thanks both for answering. The intent is to mount them on a drone as a multispectral system and thus WiFi is unfortunately not an option due to interference. Raspberry zeros don't have ethernet plugs. – ionas Aug 4 '19 at 8:27
  • The problem you won't solve is that the Linux kernel on Raspbian doesn't have any support for running a RPi as an i2c slave. So it is a non-starter. You're going to have to use radio or something like RS485 serial. – Dougie Aug 4 '19 at 9:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.