Skip to content

Instantly share code, notes, and snippets.

@rdehuyss
Last active December 27, 2020 04:55
Show Gist options
  • Save rdehuyss/51b10a6df3f4565040a53059279f48ce to your computer and use it in GitHub Desktop.
Save rdehuyss/51b10a6df3f4565040a53059279f48ce to your computer and use it in GitHub Desktop.
from ota_update.main.ota_updater import OTAUpdater
def download_and_install_update_if_available():
ota_updater = OTAUpdater('url-to-your-github-project')
ota_updater.download_and_install_update_if_available('wifi-ssid', 'wifi-password')
def start():
# your custom code goes here. Something like this: ...
# from main.x import YourProject
# project = YourProject()
# ...
def boot():
download_and_install_update_if_available()
start()
boot()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment