def newFirmware(): from main import ota_updater ota_updater = ota_updater.OTAUpdater( 'https://github.com/mastercba/almacigo') ota_updater.download_and_install_update_if_available( 'TORRIMORA', 'santino989') ota_updater.check_for_update_to_install_during_next_reboot()
def newFirmware(): from main import ota_updater ota_updater = ota_updater.OTAUpdater('https://github.com/mastercba/logger') ota_updater.download_and_install_update_if_available( 'TORRIMORA', 'santino989') # ota_updater.using_network('TORRIMORA', 'santino989') ota_updater.check_for_update_to_install_during_next_reboot() # # ESP32 Pin assignment # i2c = I2C(-1, scl=Pin(22), sda=Pin(21)) # oled_width = 128 # oled_height = 64 # oled = ssd1306.SSD1306_I2C(oled_width, oled_height, i2c) # oled.text('start LOGGER 0.4', 0, 0) # oled.show() # print('done !') # while True: # led.value(0) # sleep(0.1) # led.value(1) # sleep(0.1) # try: # sleep(2) # oled.text('start LOGGER 0.4 !', 0, 0) # oled.text('Hello, World 2!', 0, 10) # oled.text('Hello, World 3!', 0, 20) # oled.text('Hello, World 4!', 0, 30) # oled.text('Hello, World 5!', 0, 40) # oled.text('Hello, World 6!', 0, 50) # oled.show() # except OSError as e: # print('Failed to read sensor.') #def process(): # import time # for i in range(0,10): # print(i*3) # time.sleep(3)
def download_and_install_update_if_available(): o = ota_updater.OTAUpdater('https://github.com/DenisCrnic/ota_test/') o.download_and_install_update_if_available('Denis', 'ljubljana') o.check_for_update_to_install_during_next_reboot()
def boot(): my_ota_updater = ota_updater.OTAUpdater(GITHUB_URL, main_dir="main") # download_and_install_update_if_available(my_ota_updater) start(my_ota_updater)
def download_and_install_update_if_available(self): o = ota_updater.OTAUpdater( 'https://github.com/DenisCrnic/SECCS_client') o.download_and_install_update_if_available() o.check_for_update_to_install_during_next_reboot()