Posts

Showing posts from September, 2015

Balance Bot V2

Image
My current balance bot sort of works, but it's surprising it does: it's centre of gravity is actually only about 60mm above the motor axis. The whole thing ways 320g. The 6 AAA batteries only weigh 70g, so despite being right at the top, the don't affect the centre of gravity much. 6 AA batteries would weigh about 180g. That would add a 34% to the overall weight, and move the centre of gravity much higher. Seems like a dramatic increase in weight: it would be nice to be a bit more incremental. More AAA batteries isn't really worth considering: they only weight 12g, vs 30g for an AA. 4 AA would deliver much less power/torque, so that's no good. There's no middle ground, in other words. I'm also going to make the whole thing a bit taller: I need more space to add more sensors in any case. Last time I made the frame, I needed an elaborate jig to get it square and it actually didn't work that well. This time, I decided to use some short bits of a

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.