Arduino OTA-Why have to run continuiously?

Can anybody explain why Arduino OTA has to run so much uninterupted? it seems such a waste of power, especially when trying to develop low power projects. Is there not a way to tell the ESP to get redy for an update push and then go back to sleep?

To be able to do so, it needs to listen when you try to tell it something. So that's why the OTA routine runs frequently.

For a low-power application, consider foregoing OTA altogether, or alternatively only run the listener periodically/conditionally. What will work best, depends on the application and context.

Your topic has been moved. Please don't post in "Uncategorized"; see the sticky topics in Uncategorized - Arduino Forum.

for a battery powered project use OTA download with the ESP8266httpUpdate library, which is bundled with the platform

thanks... i was wondering if it was possable to run the listner... lets say for 5 minutes every hour... that should be more than enough... Everything i was reading seemed to say if you ever stopped listening you couldnt restart...

Yeah, but you'll have to time your uploads to the ESP to coincide exactly with this moment. I guess that's where the challenge lies. But it should be possible in principle to only run the listener momentarily.

1 Like

You can even trigger it with a button press if that's what you want. The handle() function needs to be called regularly at the start and during the attempted update, that is the whole requirement. How you trigger that is up to you.

1 Like

yes thanks for the info... i am thinking a sub-routine in the main loop
I understand that the listening function will need to be called continuiously during this phase

i was thinking it couldnt be an all or nothing thing... there is always a happy medium, but the basic tutorial videos did not go that far!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.