# This example uses Maker Pi Pico import machine import utime from machine import Pin #by PicoLe-22 D@CC #on 2021EMay24 progName="deviceReset_pico.py" print(progName) print("Reset: program blinks leds 0- 25 on, then off") print(" then sets every pin as input") for GPnn in range(0,26): #except 26 ledPin = machine.Pin(GPnn, machine.Pin.OUT) ledPin.value(1) utime.sleep(.2) ledPin.value(0) ledPin = machine.Pin(GPnn, machine.Pin.IN) #end for print("after setting GP25 as IN") print("5 blinks of GP25, the led on the pico") GP25=machine.Pin(GPnn, machine.Pin.OUT) for i in range(0,5): blink pico led 5 times GP25.value(1) utime.sleep(.2) GP25.value(0) utime.sleep(.2) for GPnn in range(26,30): #except 31 print("GP",GPnn," setting to IN") ledPin = machine.Pin(GPnn, machine.Pin.IN) #end for print(" Now GP20,21,22 sw/LEDs all ON, ADC0(GP26) might be ON") # source: none # date mod: 2024Feb29 # deviceReset_pico.py