Proper design of threading

YordanY
Posts: 6
Joined: Wed Oct 31, 2018 10:48 pm

Proper design of threading

Postby YordanY » Sat Apr 10, 2021 5:48 pm

Hello forum!
I am stuck on the question about proper design of threading for my LilyGO T-Watch 2020 V1 which is ESP32 based.
And I am looking for opinions, and ideas, and guides .. think-tank alike. Everyone is welcome to give an idea or add on proper design (ofc something not very extensive I mean. as shorter as better if possible :) ).
So.. I need to separate the WiFi/Httpclient related tasks from the task related to the drawing of the user interface and the interactivity, but in the same time I need to preserve as much as possible the small battery the device coming with.
Since the project which I am thinking of is waking every 2-3 minutes and checking the server for new things, and if there is - to show them to me, else just going back to sleep.
So.. I am thinking of Light Sleep mode to keep the things on ( since there will be always calculations in progress which I need to check much frequently ), and Wifimulti - since i have a few AP's.
Wondering as well if it is a good idea to lower the frequence to 80MHz to preserve the battery, and if it is - then shall I suffer some heavy problems with the Wifi or connection , range , or anything else ?
Please add whatever You believe it can give me some headwind or safe me from some bad situation.
Thanks in advance fellows !

Who is online

Users browsing this forum: Vishna and 144 guests