For a (for now MIDI only) project I was planning to use multiple Arduinos and send messages around.
However, for the latency, I can have max 10ms (to prevent audible delay).
I hoped to use WIFI modules (ESP-01), however, according to a previous question in Question, one remark that due to HTTP overhead the time/latency would be 15 ms. So that means WIFI is not possible.
- Latency of <= 3 ms (rationale: I need at least 5 ms for processing, and want to keep total latency < 10 ms)
- Preferably a wireless solution (rationale: I want to add later more Arduinos and want to prevent cabling)
- Preferably not using a hardware serial (low prio requirement) (rationale: the MIDI box which is a Mega, would preferably need 4 MIDI inputs, using a hardware serial would reduce one, software serial is unacceptable for MIDI).
- Arduinos are very close together, probably within centimeters (upto like 50 centimeters)
- Messages are short (like 5-10 bytes max)
- Burst of messages can be possible, but not so likely
- Receiving MIDI input by Arduino 1
- Sending (filtered/changed) message to Arduino 2
- Arduino 2 process the manage, takes <= 5 ms
- Arduino 2 sends message back to Arduino 1
- Arduino 1 converts it to a MIDI message and sends back
This all needs to be done within <= 10 ms
My thoughts so far:
- WIFI: HTTP seems to result in 15 ms delays, which is against my requirement.
- RF: probably overkill since my Arduinos will be very near to each other. Also I would need both a receiver and transmitter in both Arduino's.
- IR: Due to out-of-sight problems not very convenient.
- I2C: Might be possible, planning to use later also an I2C display possibly but should not be a problem
- SPI: On Arduino 2, I'm already using an SRAM with SPI which I do not want to stress more (also a time-critical resource). Also an SD card via SPI is used (but this is not a time critical resource).
- Wire: Not checked yet
Question Is there any wireless (or wired) solution I can use (probably beyond the ones I analyzed)?
115200 baud is what I need for a Serial connection, probably a SPI/I2C (latter preferred) is also acceptable. Or I might have missed other communication possibilities.