My code.py file has the following in it:
Code: Select all
# code.py selector
import time
import supervisor
import microcontroller
CODE = 'pin_scan.py'
time.sleep(1)
supervisor.set_next_code_file(CODE)
supervisor.reload() # Ctrl-C then Ctrl-D
Code: Select all
import time
import board
from digitalio import *
Code: Select all
'''
Stuff
'''
The RPi Pico W is mounted on a Maker Pi Pico Rev1.2 chassis.Adafruit CircuitPython 8.0.0-beta.6 on 2022-12-21; Raspberry Pi Pico W with rp2040
After power has been removed and restored and the small bit of code(s) are run:
1) pins 6, 7, 8, 9, 15, 16, 17, 20, 21, 22 are shown as high by the LEDs on the chassis.
2) The LED on the Pico W flashes every 5 seconds.
3) If I set GPIO pins to a state other than the one in 1) they are returned to the state in 1) at the end of the code run.
Are there things in the OS or the supervisor code that would cause this behavior?
Bruce