-->
Page 1 of 3

Ardu OTA Example-example

PostPosted: Thu Jun 16, 2016 8:36 am
by gambituk
Hello, I've followed the tutorial http://esp8266.github.io/Arduino/versions/2.0.0/doc/ota_updates/ota_updates.html which is reasonably easy to follow. But i have a question regarding the sketch to use as an update.

in the tutorial it says:
Note: To be able to upload your sketch over and over again using OTA, you need to embed OTA routines inside. Please use DNS_SD_Arduino_OTA.ino as an example.


Which is fine, but i cannot see if all of the example sketch is required? what can be removed aside from the obvious...?



I guess the tl/dr is:

What is the minimum ota routines i need to add to my sketch to make it continue to be ota compatible, and can anyone share examples that they have working with ota included! :D


Thanks in advance for any and all suggestions

Re: Ardu OTA Example-example

PostPosted: Thu Jun 16, 2016 9:24 am
by martinayotte
The BasicOTA is pretty small and showing the minimum thing needed.
https://github.com/esp8266/Arduino/blob ... sicOTA.ino

Re: Ardu OTA Example-example

PostPosted: Thu Jun 16, 2016 11:34 am
by gambituk
That's more digestible, the mDNS example i guess is older, i've integrated the ota into my sketch and it uploads without problems now! :lol:

Thanks for the pointer!

Re: Ardu OTA Example-example

PostPosted: Mon Aug 15, 2016 3:21 pm
by buchacho
Should you have some kind of flag or switch to get the device into OTA mode to integrate into a sketch? I saw a couple youtube vids that either use either a physical switch or some flag through a web interface. Right now I am interested in using OTA during development so I can flash from the IDE like I do via usb, but at any time without having to touch the ESP module or remember to flag something.

https://youtu.be/GoQXOLB50HA