I just bought 2 new raspberry pi pico units, but I am struggling with them. I ran a few basic commands in Thonny's shell and maid a program to have the onboard LED blink. Everything is working fine but I can't run any program that has external connections. I can't blink an external led, check if a button is pressed, etc. This happens with both the pico boards. Here is how I installed the Pico requirements :
- I installed Thonny and flashed the micro-python firmware(.uf2) to the Pico in boot-loader mode (RPI-RP2 mass storage device).
- When I flashed the firmware though, the file finished transferring and the pico ejected itself, then I opened it in bootloader mode again but the firmware file isn't showing itself in the RPI-RP2 path, does that mean the firmware didn't install? Also "Micro-python version1.19..." does show up on my Thonny's shell screen.
- I installed micro-python from Thonny's "Configure Interpreter > Interpreter > Update or Install Micropython" tab too.
Here is the code I used for Led Toggle-
import machine import utime led = machine.Pin(7, machine.Pin.OUT) while True: led.value(1) utime.sleep(1) led.value(0) utime.sleep(1)
I connected an 220 ohms resistor and an LED(anode) in series with the pin labelled GP7 and the ground of the Pico(one of the pins labelled GND) to the cathode of the led. I changed the code to 15 and used the pin labelled GP15 with both the Pico boards but the LED doesn't blink, it doesn't even turn on. I added a
led.value(1) statement and the shell prints "ON" but the led does not blink.
Anyone know what the problem might be? Is it a pico problem or a GPIO problem or a firmware problem?