rp-rs / rp-hal-boards

Board Support Packages for RP2040 based PCBs
199 stars 82 forks source link

pi-pico "blinky" not blinking #65

Closed cylewitruk closed 4 months ago

cylewitruk commented 4 months ago

Hi there!

Just getting started with embedded so this is my first time ever trying this... but I think I managed to get everything setup with my pi-pico and I tried both of the "blinky" examples, which appear to "install" correctly:

āžœ cargo run --example pico_countdown_blinky
   Compiling rp-pico v0.9.0 (/home/cylwit/Code/github.com/rp-rs/rp-hal-boards/boards/rp-pico)
    Finished dev [unoptimized + debuginfo] target(s) in 0.14s
     Running `elf2uf2-rs -d /home/cylwit/Code/github.com/rp-rs/rp-hal-boards/target/thumbv6m-none-eabi/debug/examples/pico_countdown_blinky`
Found pico uf2 disk /media/cylwit/RPI-RP2
Transfering program to pico
81.50 KB / 81.50 KB [====================================================================================================================================] 100.00 % 124.88 KB/s 

But nothing happens on the Pico. Have tried re-installing both (boot-select + plug-in) several times, and power cycling, but to no avail... I'm only using the USB, which from what I've understood will provide the Pico with the power it needs?

As a first-timer I'm probably doing something stupid, but any help would be appreciated :smile:

9names commented 4 months ago

Is it a Pico W? If so, the LED isn't directly connected to the rp2040, it's attached to the wifi chip. I'm going to preemptively answer in case your answer is yes. rp2040-hal does not support the wifi chip yet, so it can't blink the onboard LED. you can drive an external LED from one of GPIO headers instead if you would like to test it out.

embassy-rp has support for the wifi chip, so you should be able to run their blinky: https://github.com/embassy-rs/embassy/blob/main/examples/rp/src/bin/wifi_blinky.rs

cylewitruk commented 4 months ago

Is it a Pico W? If so, the LED isn't directly connected to the rp2040, it's attached to the wifi chip. I'm going to preemptively answer in case your answer is yes. rp2040-hal does not support the wifi chip yet, so it can't blink the onboard LED. you can drive an external LED from one of GPIO headers instead if you would like to test it out.

embassy-rp has support for the wifi chip, so you should be able to run their blinky: https://github.com/embassy-rs/embassy/blob/main/examples/rp/src/bin/wifi_blinky.rs

It's indeed a W, good catch! šŸ˜Š Thanks for the quick response, I think I'll try both of your suggestions for fun :)