rp-hal icon indicating copy to clipboard operation
rp-hal copied to clipboard

Not able to blink the onboard led on rpi pico w

Open Narayanbhat166 opened this issue 2 years ago • 9 comments

I'm trying to get started with running rust on my newly purchased rpi pico w ( with wifi support ). Initially when I set everything up and run the blinky example, it did not work. I then ran the micro python example and the led was working. For the w version the rpi community says that there is a slight change in the way onboard led is configured

Link to the thread https://forums.raspberrypi.com/viewtopic.php?t=336836

Is there any change that must be made in the rust blinky example to get it working?

Narayanbhat166 avatar Dec 16 '22 21:12 Narayanbhat166

"a slight change" is an understatement: The LED is connected to a different chip, the wifi one, not the RP2040. Therefore, to blink the LED, you need a wifi driver. Which is not yet available in the released version of rp2040-hal.

If you are adventurous, you could try the experimental WIP version at https://github.com/jannic/rp-hal/tree/pico-w. The blinky example is at https://github.com/jannic/rp-hal/blob/pico-w/boards/rp-pico-w/examples/pico_w_blinky.rs

(BTW, please don't close this ticket. There have been multiple instances of the same question in the past. Perhaps an open ticket with a descriptive title will help other people with the same issue.)

jannic avatar Dec 16 '22 21:12 jannic

This works. Thanks!

Narayanbhat166 avatar Dec 17 '22 05:12 Narayanbhat166

I had same issue thanks so much 🙏

metetik avatar Dec 20 '22 17:12 metetik

Still works! :)

dewey4iv avatar May 01 '23 19:05 dewey4iv

Is the pico-w branch going to be merged into main at some stage? I see it's behind main by about 6 months? Anything others could do to assist with it?

alexkingnz avatar Jul 17 '23 05:07 alexkingnz

In theory, that's the idea. In practice, it was blocked on some other crates which were not released to crates.io yet, and would probably need nightly rust.

I didn't follow recent developments closely so I'm not sure if the reasons still exist. My plan is to revisit the situation every now and then, but I don't want to spend much time on updating the branch until it is realistic to actually merge it.

jannic avatar Jul 17 '23 07:07 jannic

Is there any progress on pico w support?

cartercanedy avatar Jul 20 '24 20:07 cartercanedy