NodeMCU UDP server

I want to be able to control my balancing robot just from my phone, but the phone can't be a UDP server - so the robot must be.

UDP servers in NodeMCU seem to be limited to one client at a time: you create a server, and bind the receive event to get datagrams sent to it. When you call send on the server socket, it sends the data to the last client to send something to the server. If you create a client UDP connection, the server will stop receiving datagrams, and the client won't receive any either. The client will be able to send datagrams though. I guess this is a bug.

It took me a great deal of messing around to get to this point, but now I have a little test harness for it, and a fairly generic UDP serial server.

I'm pretty sick of NodeMCU by now. Time to figure out how to build my own firmware.

Popular posts from this blog

3D Printer ramblings

Balance Bot V2

Robot arm