I wish programming ESP was easy, especially if you want maximum power saving
I am looking for a clean way to connect to wifi, and guard this with a timeout.
My program is able to connect and to give status informaton by wifi_set_event_handler_cb.
So... how to guard this attempt to connect with a timeout > Set a seperate timer?
How to pass back control to my "main" function?
Same issue with the status connected in the callback, I need connection before a certain point in the "main" function.
What's the best solution?
I can't believe polling connection status in a loop is the best solution here?
Probably there has to be a delay in this loop to hand over control to the system and to keep the watchdog happy in this case?
What is the SDK equivalent to yield()?
I don't want to burn cycles but do measurements in the meantime that can be averaged.