Best practice to send a lot of data to the esp.

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
holgerkraehe
Posts: 3
Joined: Mon Jan 30, 2017 9:04 pm

Best practice to send a lot of data to the esp.

Post by holgerkraehe » Tue Jan 31, 2017 5:51 am

Hello

Following scenario:

Webbrowser <-> Router <-> ESP -> Device

The webpage does contain some sliders.
With this sliders i would like to be able to controll the Device which is conntected to the ESP.
The slider data should be sent to the ESP as fast as possible.

Actually i tried to do this with a http server on the ESP and calls a custom URL from the Webpage like http://192.168.1.50?value=slidervalue
This works basically quite well but if i change the slider too fast, the ESP got stuck and tells me that it has not enough memory.
I also think that the approach over regual HTTP GET is too overheady.

Would websockets be the right way to go? Or are there any other, more suitable options out there?

Thanks for your poroposals.

User avatar
deshipu
Posts: 1388
Joined: Thu May 28, 2015 5:54 pm

Re: Best practice to send a lot of data to the esp.

Post by deshipu » Tue Jan 31, 2017 8:38 am

Yes, sounds like websockets are what you are looking for here. It may also help to write the code in a little more robust way, to avoid the out of memory errors.

Post Reply