Ultra-highspeed real-time monitor of WebSocket on Microcontroller [STM32Nucleo]

I managed to send data from a microcontroller (STM32Nucleo) implementing WebSocket to a browser and display it on the monitor, but when I increased the update rate, the system became unstable and would stop or disconnect.

At first I thought it was due to browser or WebSocket specifications, but when I found the cause and solved the problem, I was able to update at a rate almost 100 times higher than the original, almost at the limit (depending on the microcontroller settings). This is the kind of communication that takes advantage of the WebSocket protocol.

After the improvement, WebSocket communication became stable, and the following movie shows data update at a very high rate of 1 ms sampling. Although it may depend on the conditions, it seems safe to assume that there is almost no restriction on the display speed of the browser or WebSocket itself.

Colum

I don't think we will ever actually have them monitored at 1ms cycles, but the big takeaway is that it turns out that WebSockets can be used to exchange data between MCU and the browser at arbitrary cycles with almost no restrictions.

Follow me!