NOTE: This done with an ESP-12E running Espruino on the latest Travis builds of User1 and User2 as they include crypto support which is needed for the WebSocket Server.
This is an example of using WebSockets for real-time interaction, it is adapted from the Interactive Web UI example. The Espruino acts as both the WebSocket Server and a web server to serve the page to the client.
The code for the webpage for this client is in this Gist on GitHub as it was too large to fit on the forum. This code send the value over a WebSocket every time the value is updated instead of sending a POST request when the mouse is lifted like the Interactive Web UI demo.
The Espruino code is just below (New Code in this post). Just upload it to your ESP after setting Wifi up and saving that. I'd recommend visiting the page from a smartphone, the touch controls feel fluid. The webpage is a (espIP):8000
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
NOTE: This done with an ESP-12E running Espruino on the latest Travis builds of User1 and User2 as they include crypto support which is needed for the WebSocket Server.
This is an example of using WebSockets for real-time interaction, it is adapted from the Interactive Web UI example. The Espruino acts as both the WebSocket Server and a web server to serve the page to the client.
The code for the webpage for this client is in this Gist on GitHub as it was too large to fit on the forum. This code send the value over a WebSocket every time the value is updated instead of sending a POST request when the mouse is lifted like the Interactive Web UI demo.
The Espruino code is just below (New Code in this post). Just upload it to your ESP after setting Wifi up and saving that. I'd recommend visiting the page from a smartphone, the touch controls feel fluid. The webpage is a (espIP):8000
Immediately after uploading the code the memory looks like this
Then when the first user connects
I believe the history is cleared and the out of memory error isn't a problem