So I'm looking to use a few (2 for now, more later) Arduinos in combo with a single Raspberry Pi master. This is basically the setup I want:


What sort of protocol would be best for this type of thing? I'm looking at 1-wire for simplicity but after several hours of Googling I seem to know less about how to do it than before. The cause of this is likely that I couldn't find a lot of info for this.

If I do go with 1-wire, what will I need? Will I need shields for the arduinos? Will I need special sensors? Or is this simply not possible?

Any tips?

EDIT: Huh. I found a tutorial, I'll see if it works. http://blog.retep.org/2014/02/15/connecting-an-arduino-to-a-raspberry-pi-using-i2c/

  • You really need to define your problem better. It depends on the number of sensors, processing required, quantity of data and physical separation. If you have a number of sensors in close proximity why not just connect them to the Pi directly. If long distances then serial is most appropriate. My inclination would be to have the Pi poll each Arduino (assigning a dedicated address to each) and log the responses. (I have done this involving 100s of sites up to 1000km away). You could use simple TTL levels (open collector or tri-state) RS232 up to networked connections.
    – Milliways
    Commented May 15, 2014 at 12:08
  • Backbone I2C. Arduino <> Sensor 1-Wire. That's good?
    – user26782
    Commented Feb 8, 2015 at 12:28

3 Answers 3


Just use serial, and add an individual Select line (similar to the CS in SPI) to every Arduino. Just make it so that the arduino ignores all serial input, and queues all output, if his Select line is low.


You can use concept from rs485 interface as somebody mentioned before.

All transmitters / receivers connected to the "bus" with open emitter/ open drain transistors with pullup resistors. Every device has to have unique internal ID number.

Use RPi as bus master - polling each device to send his data by ID - so all the Arduinos have to listen and transmit only when bus master asks them to do so.


Can't you connect them using Ethernet in a LAN and then build an application protocol over this. What is your objective ?

Your configuration seems to be Raspberry Pi act as IoT gateway and Arduino devices are hosts for sensors that want send data to gateway and then to the Cloud.

  • No, I want to keep cost to a minimum. In its working state it will have quite a few arduinos, and as such a network shield for each one will be quite expensive. Commented May 15, 2014 at 9:38
  • But I2C and/or SPI connections are for onboard communication on minimum distance. For example, your Arduino board can comunicate with a temperature sensor using I2C or SPI. In your case Arduino boards and Raspberry Pi aren't near so you can use serial communication ? RS485 ? However you have limit on ports available.
    – user14897
    Commented May 15, 2014 at 9:45
  • I2C will travel, say, 5 metres. It really depends on the maximum distance expected by the poster. I2C is the natural solution for the poster.
    – joan
    Commented May 15, 2014 at 10:32
  • If range is a concern I'm almost tempted to suggest a CAN bus, but i2c will be easier.
    – user8894
    Commented May 15, 2014 at 10:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.