-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
Whenever calling supervisor.reload() on my new, freshly updated Slider Trinkey, it just stops the code, forcing me to manually reset the device for supervisor.set_next_code_file() to take effect, which isn't the case for my other Trinkey devices running Circuitpy. I pasted the relevant code below:
`import time
import board
import analogio
import supervisor
import neopixel
import touchio
import gc
pixels = neopixel.NeoPixel(board.NEOPIXEL, 2)
analog_pin = analogio.AnalogIn(board.A0)
touch = touchio.TouchIn(board.TOUCH)
gc.collect()
while True:
if supervisor.runtime.serial_bytes_available:
value = input().strip()
if value == "":
continue
supervisor.set_next_code_file("/" + value + ".py")
supervisor.reload()`
On my other devices, the code in the while loop would cause the device to load whatever file is typed into the console/sent over serial. Instead this is the output:
`Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
sidecar (Typed into console)
Code done running.
Press any key to enter the REPL. Use CTRL-D to reload.`
If I press ctrl+D, it reloads into the new file, but why is supervisor.reload() acting like I pressed ctrl+C instead of reloading?