Hi, I'm in the need of replacing a data cable for some wireless interface.
I have a Processing sketch sending data to 2 Arduino based devices via the serial port. The data string is not too long (an array of 12 bytes) but I need to send that data 30 or more times per second (on each frame of the Processing sketch). My idea is to replace the USB cable for a wireless interface working as a serial connection. I have some nRF24L01+ (for radio) and some ESP8266 (for WIFI) boards, but I don't know which is the best approach for this case. I know that maybe with WIFI I'm not in the need of connecting any kind of device to my computer, which is ideal when compared to having to connect an antenna an radio transmitter.
what if i want to save some money on cables and want to connect garage alarm to the alarm box via wifi, if i understood well it is going to have false triggers...(i want to send signal that everything is ok few time a second instead to send it only when the alarm is activated)
Robin2:
That seems an unusual requirement, especially coupled with "Instant interaction (no delay)"
With any wireless system you have to be prepared for lost messages.
If you describe the project you are trying to implement it will be much easier to give useful advice.
...R
Ok, when I say "instant interaction" I mean no visible delay, it's OK if there's some delay on the logic level not perceivable by eye.
It's also OK if theres some lost messages, messages are redundant, the same array is repeated over and over until something changes and those new values start to get repeated.
The project: I have some high power RGB LEDs that I'm controlling in realtime from a Processing sketch. The data I need to send is a list of values that on the Arduino side translate to things like color, brightness, saturation, etc. There's 12 values, each ranging from 0 to 255.
Also, I think that maybe Bluetooth is a good option.
Is it practical to use two ESP8266s to drive the LEDs rather than two Arduinos? It may not be as they don't have as many I/O pins and they are 3.3v devices. But if it is possible then they could communicate directly with your PC using WiFi and UDP messages.
Bluetooth is generally just a 1-to-1 communication system so I don't know if it could communicate between your PC and two Arduinos. If you had to break and re-make connections I suspect the number of messages per second would be low. However I have very little experience with Bluetooth.
My own preference would be to use nRF24s. However you will need an Arduino connected to the PC to operate the nRF24 that transmits the data. nRF24 modules are controlled directly by an Arduino whereas with Bluetooth and ESP826 modules connected to an Arduino the data must go through a serial connection between the Arduino and the module.
Yes, I think that the nRF24 is the best option for transmitting simultaneously to two devices, but I don't like very much the idea of attaching something to my computer, is one of the reasons why I'm choosing to go wireless. I'll look a little into Bluetooth as to know how can I send data to two devices (the two devices use different parts of the data, so I think I can split it into two arrays and send them separated).
maurobarreca:
Yes, I think that the nRF24 is the best option for transmitting simultaneously to two devices, but I don't like very much the idea of attaching something to my computer, is one of the reasons why I'm choosing to go wireless.
An nRF24 is wireless.
I believe you can buy adapters that plug into a USB port and allow you to connect directly to an nRF24. However IMHO using an Arduino gives you more flexibility.