Go Down

Topic: Arduino to Windows UDP (Read 687 times) previous topic - next topic

GoForSmoke

What does it take to set up a Windows UDP connect to send/receive to Arduino?

Frankly I get a lot of "it can't be done" after "why?". There's the oh no, you have to have a network device to talk to UDP which the have-to part must be wrong -- if a program can run on a PC that passes UDP messages then what law prevents it from reading and writing to serial COM?

Perhaps it is far simpler than I thought, but I am not a freaking Windows Network engineer.

Nick Gammon on multitasking Arduinos:
1) http://gammon.com.au/blink
2) http://gammon.com.au/serial
3) http://gammon.com.au/interrupts

zoomkat

Quote
What does it take to set up a Windows UDP connect to send/receive to Arduino?


I would think you would need a windows UDP qpplcation to run on the windows machine, an ethernet adapter and appropriate code on the arduino, and applicable network connection between the two. No rocket science there.

Quote
if a program can run on a PC that passes UDP messages then what law prevents it from reading and writing to serial COM?


What law prevents turning an empty pizza box into a flat screen tv?
Google forum search: Use Google Advanced Search and use Http://forum.arduino.cc/index in the "site or domain:" box.

GoForSmoke

Let's try this simpler, since my decades in coding tells me this should be Simple.

I have seen many programs that communicate to Windows via UDP, like UDPSpeed that shows IL-2 flight sim gauges. The app sends and receives small packets and uses the data to present graphics.

So why can't the same or similar app simply route the messages to and from a COM port instead of present graphics? The app on the PC handles network, as they already do.  Or is there some reason why the same PC program can't do both UDP and serial COM that can do both UDP and graphics?

I can see that there will be some extra interface just to tell it which COM port to read/write but honest, the other end is there this time in IL-2 devicelink.
Nick Gammon on multitasking Arduinos:
1) http://gammon.com.au/blink
2) http://gammon.com.au/serial
3) http://gammon.com.au/interrupts

PaulS

Quote
I have seen many programs that communicate to Windows via UDP, like UDPSpeed that shows IL-2 flight sim gauges. The app sends and receives small packets and uses the data to present graphics.

So, write your own app that does the same thing (except, obviously it isn't L-2 flight sim packets that you want).

Quote
So why can't the same or similar app simply route the messages to and from a COM port instead of present graphics?

Why can't Flight Simulator actually fly my airplane to the moon. Because it wasn't designed to do that. Neither Flight Simulator or my airplane (if I actually had one).

Now, your app MIGHT be designed to actually (try to) fly my airplane to the moon. I don't know, because you haven't written it yet.

Quote
Or is there some reason why the same PC program can't do both UDP and serial COM that can do both UDP and graphics?

Is there some reason Flight Simulator can't actually fly my airplane to the moon? Because no one thought that making it capable of doing so was necessary.

Quote
I can see that there will be some extra interface just to tell it which COM port to read/write but honest, the other end is there this time in IL-2 devicelink.

Can I have a hit of whatever you're smoking?

GoForSmoke

I was checking to see if there is some catch that would make it impossible, not asking why things don't just make themselves, thank you.

Actually I do want to send IL-2 devicelink codes to make an autopilot that doesn't use as much PC resources as the ones that run completely on the gaming PC. They're okay if you have a faster PC but I'd like to try with an UNO or Teensy++ if I need more RAM since I have those.

And wonder of wonders, someone is sending me C++ source to set up the socket on the PC and pass data back and forth to the UNO, as in it really is no big deal to do what I thought should be simple.

Anyhow AFAIC, an ini file is a form of user interface. You'll have to make your own smoke, perhaps try running 2W through a 1/4W resistor? I never tried so I'm not sure if it's worth it.

I do wonder if there are people who can tell what burned up just by the smell. Maybe so, IR led made a sharp scent I won't forget soon and I know the smell of hairline trace and epoxy from long ago. That's 2 down. Not as fun as fireworks, but it's the principle that counts.

Nick Gammon on multitasking Arduinos:
1) http://gammon.com.au/blink
2) http://gammon.com.au/serial
3) http://gammon.com.au/interrupts

Go Up