-->
Page 1 of 2

UDP to Serial Bridge Arduino Examples?

PostPosted: Mon Jun 20, 2016 3:22 pm
by mitmell
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.

Re: UDP to Serial Bridge Arduino Examples?

PostPosted: Tue Jun 21, 2016 1:50 am
by bbx10node
ESP-link is a serial to TCP bridge. Does it have to be UDP?

https://github.com/jeelabs/esp-link#esp ... -wrestmqtt

Re: UDP to Serial Bridge Arduino Examples?

PostPosted: Thu Jul 07, 2016 10:24 am
by mrburnette
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

Re: UDP to Serial Bridge Arduino Examples?

PostPosted: Mon Jul 11, 2016 4:02 pm
by mitmell
bbx10node wrote:ESP-link is a serial to TCP bridge. Does it have to be UDP?

https://github.com/jeelabs/esp-link#esp ... -wrestmqtt


Yeah I've worked with esp-link in the past great stuff. Thanks for responding :) I figured out what I was trying to do with UDP so cheers.