Example sketches for the new Arduino IDE for ESP8266

Moderator: igrr

User avatar
By mitmell
#49500 This certainly isn't a new topic here...but I can't seem to find any useful examples about how to implement a UDP to Serial Bridge in Arduino. Most of the Arduino UDP examples I've seen have been bidirectional and rely on receiving data before sending it.

I just want to broadcast sensor data so I can later use it with matlab. So I'm wondering if anyone knows any good examples or has written some arduino code for this.

I'm also open to non-arduino solutions if anyone can think of them -> I'm just most familiar with arduino

Thanks :)

EDIT: Added the code that I ended up using/working for my application. In case it helps anyone. The code is slightly specific to what I was working on, but maybe it can give someone a place to start. The dynamic dns file does the same thing as the other file... just implemented so you don't have to use static IPs.
You do not have the required permissions to view the files attached to this post.
Last edited by mitmell on Thu Jul 14, 2016 2:11 pm, edited 3 times in total.
User avatar
By mrburnette
#50354
mitmell wrote:<...>
I just want to broadcast sensor data so I can later use it with matlab. So I'm wondering if anyone knows any good examples or has written some arduino code for this.
<...>


Maybe take a look at Tardis Time on my project site:
http://www.hackster.io/rayburne/projects
A serial GPS in the attic with the ESP866 AP (open) broadcasts a UDP sentence every second. The arduino code only "culls out" the sentence I specifically want, but I could just as easily send all of the GPS data.

The receiving ESP8266 receives the UDP broadcasts ... I always have 2 clients, sometimes 3. While I am using LCD displays usually, all of that could be cut out and just send to the serial port.


Ray