I have a Raspberry Pi Pico. When I upload a new program onto it the previous program is still running. What should I do? For example I write code to blink pin22, but when I change it to pin21, pin22 goes HIGH and stays on (does not blink).
import machine
import time
led_pin = machine.Pin(22, machine.Pin.OUT)
while True:
led_pin.value(not led_pin.value())
time.sleep(0.5)
I tried saving the code in the Pico with different ways but none worked.