I’d like to use a Particle Photon to send real-time data collected using a microphone over to another Photon that will receive the data and output a graphical visualization of the collected data, for example turning on and off some LEDs according to the mean amplitude that has been recorded in a given interval of time.
I don’t need a very high resolution, I just need 100 samples per second and some packet losses are fine, but I need a stable and reliable connection that doesn’t break.
I read of some examples successfully using UDP on the Core but with some issues with the code running on the Photon
and of some problems with communication interruptions
So now I’m wondering which could be the best move, so far I think I could go for:
- try to implement a UDP server/client model between two Photon, the one connected to the mic being the server, the other receiving and displaying data being the client
- try to implement the same model but using TCP protocol to avoid communication breakings
- try to implement UDP or TCP communication but with a server in between (for example a NodeJS application) that collects data from the first Photon and send those to the other Photon, in order to have a bit of a futher control over what’s going on during the data exchange
- all other proposals are welcome
what do you suggest me?
thanks in advance,