For a project i'm working on, i need 2 arduino's to talk with each other.
Will have a couple of sensors connected to it measuring different voltages, currents, and doing some basic math. This will mainly be using I2C to communicate with the arduino.
The code on the arduino will be a program with a lot of timers that calls functions that read the I2C sensors or GPIO pins and store these in different variables.
There will also be a few digital outputs switching a relay once a command for this is received.
Will be a user interface with a OLED display, buzzer, light sensor, some lights, and a lot of buttons.
This module must display the variables generated by arduino 1, do some math, and send commands to switch the digital outputs off arduino 1
A cable length of 10m is plenty. I want it to communicate over every possible kind of cable/wire. I can either use 2 of 4 wires for this.
I will not be using any shields. I will design a custom PCB. It would be preferred not to use to much components and keep the needed components cheap. (2-3 $ max)
High speed is not required. If al the readout variables form arduino 1 are send 2-4 times per second, that is fast enough for me. On the other hand, when i press a button on arduino 2, i want it to switch a digital output on arduino 1 in 200ms or less.
The idea is to only have 2 arduinos talking to each other, but if there are easy ways of incorporating a 3rd or a 4th arduino that also displays values or add additional sensors that would be a nice bonus.
I'm looking for a protocol and library that are easy to work with. I'm not very good with writing code so something simple is preferred.
I just want something that can easily transmit and receive global variables so that the same values are available in both arduino's.
In case of multiple arduino's i would like simple addressing trough digital inputs and jumpers. 2 or 3 bits should be plenty.
All of the above requires duplex communication. If simplex (only arduino 1 sending data to arduino 2) is much simpler this might be a option too. I can also control the relays at arduino 1 with the digital output of arduino 2. The wires are already there.
Hope you guys can recommend some protocols and good library's!