We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b566a87 commit c019b05Copy full SHA for c019b05
examples/flash_firmware.py
@@ -1,10 +1,24 @@
1
-# from machine import reset
+import sys
2
+
3
4
+def reload_modules():
5
+ to_be_reloaded = []
6
7
+ for m in sys.modules:
8
+ to_be_reloaded.append(m)
9
+ del sys.modules[m]
10
11
+ for m in to_be_reloaded:
12
+ print(f"Reloading {m}")
13
+ exec(f'import {m}')
14
15
16
+reload_modules()
17
from arduino_alvik import update_firmware
18
19
# this is a patch to fix possible running threads on Alvik
20
from arduino_alvik import ArduinoAlvik
21
alvik = ArduinoAlvik()
22
alvik.stop()
23
-update_firmware('./firmware.bin')
-# reset()
24
+update_firmware('/firmware.bin')
0 commit comments