Skip to content

vindolin/micropython_websocket_test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

micropython_websocket_test

Just a little experiment with MicroPython and websockets on an ESP32.

Control the color of a rotating gradient NeoPixel ring from a webpage using websockets.

Multiple windows to the same module can be open and the widgets are synchronized through the websockets.

The client websocket automatically reconnects after connection loss.

Copy networks.py, wifi.py, color.py and main.py and the subfolder www to your flash filesystem.

Also copy microWebSrv.py and microWebSocket.py from https://github.com/jczic/MicroWebSrv.

Too bad that I get the error "MicroWebSocket : Out of memory on new WebSocket connection." when trying to connect more than two clients :(

Edit: with some calls to gc.collect() at specific places, it's now possible to connect with 6-7 websockets.

Connections take about 9 seconds though.

Screenshot

About

Controll a pulsating NeoPixel ring from a webpage using websockets.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published