Everyone’s favourite IOT module, the ESP8266, is often the go-to choice for any project that needs quick and cheap control over the web. [Andi23456] wanted to control his quadcopter using the luxury of his mobile phone and thought permanently tethering an ESP12-E module to the quadcopter was exactly what he required.
The ESP8266, really showcasing its all-round prowess, hosts both a web server for a HTML5 based joystick and a Websockets server so that a client, such as a phone, could interact with it over a fast, low latency connection. Once the ESP8266 receives the input, it uses interrupts to generate the corresponding PPM (Pule Position Modulation) code which the RC receiver on the quadcopter can understand. Very cool!
What really makes this realtime(ish) control viable is Websockets, a protocol that basically allows you to flexibly exchange data over an “upgraded” HTTP connection without having to lug around headers each time you communicate. If you haven’t heard of Websockets you really should look really check out this library or even watch this video to see what you can achieve.
Nice. I’m doing a similar project with LED grids over Wi-Fi with raspberry pies.
Using socketIO and Node
An alternative to Websockets : https://hackaday.io/project/20170-httap
thanks u sharing this. can I use it in c#?
Pule position monitoring ayy?
Funny. I was thinking of the same thing.
References missing from HaD post:
https://en.wikipedia.org/wiki/WebSocket
Above has follow-on references for applicable IETF/W3C documentation.
Why go though all the abstraction dealing with TCP WebSockets? Just use IP/UDP/RTP header dictionary-based header compression instead. Much lower latency, and negligible header size once the point-to-point link is established. Simple data integrity (error control/handshaking) can take place in an optimized application-specific layer, if at all necessary.