Hi,
I use esp32 which is connected to the firebase database in the project I have several functions such as checking the status of PIR and UV sensors and sending their status to the database, I also use temperature and soil moisture sensors and send data with measurements every minute, also uses a mini servo motor and led strip which are controlled from the database. I have a question, can I somehow increase the speed of the program use FreeRTOS or make state machine? The loop from the program is below
not sure what you mean. Do you feel the code is slow and if so, have you investigated where time is spent? the loop's code does not help much see what's going on
Most of the time takes checking and sending status to firebase , sending or getting string takes about 1 second, for example during getting status from firebase (led_strip()), UV sensor change status (led_uv) and before it sends the status it has to wait 3 seconds because I have 2 function before it (mini_servo() and ledonoff())