-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Strange behaviour of onboard led sw #21
Comments
We have two variants of Pico Plus 2 and I'm trying very hard not to have either two separate builds (just more noise for users) or some kind of weird hack around this (more things to go wrong). There were some potential fixes to the LED I need to pull down which might fix the freeze you're seeing- try the release I just tagged for this: https://github.com/pimoroni/pimoroni-pico-rp2350/releases/tag/v0.0.10 Note: for Pico Plus 2 Wireless you should not need to specify any LED pins. I'm expecting |
Sorry to add to your woes, but I'm also trying to toggle the LED on a
This is using the 0.0.10 build. At start up it reports: It doesn't know about
In the release notes there's also this statement:
Which seems to contradict the other statements. Anyway, toggling GPIO0 doesn't seem to affect the LED either. Another thing I've noticed is that the ADC core temp channel seems to be incorrect:
so .. maybe the wrong set of defines (e.g. for the On the plus (sic) side, I can run the 'catfacts' example for wifi though, so the implementation of wifi on the RM2 is fine. Keep up the good work, it must be a nightmare trying to support all those boards .. |
Okay it took me grabbing a Pico Plus 2 and flashing the build before the penny dropped, but you need the I corrected my release notes to clarify that it's And, thank you, it is indeed currently a nightmare! |
Doh! Of course .. it actually says that at the top of the of the release notes ..
Confirmed that all works nicely with the correct firmware (and that LED is very bright)! |
Oh no no, I added that after this thread to avoid others falling into the same trap! |
Hey, I’m using the Pico 2 W and have tried all the releases posted here: GitHub Release. Unfortunately, I haven’t been able to get the LED working on any of them, even when using the recommended "LEDW" trick. To provide more details:
Thank you for your time and assistance, |
Hi, a few things:
Transcript follows: >>> from machine import Pin
>>> led = Pin("LEDW", Pin.OUT)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: unknown named pin "LEDW"
>>>
>>> led = Pin("WL_GPIO0", Pin.OUT)
>>> led.value(1)
>>> led.value(0) There have been so many new boards issued that everyone is struggling to catch up! There isn't an official Micropython release yet for the Pico2W, but Raspberry Pi do have a link to a preview build on the announcement page. Circuitpython have builds already listed on the download page. |
Awesome, thank you for your help. With that version, it worked using "LED". from machine import Pin
from time import sleep
led = Pin("LED", Pin.OUT)
led.on()
sleep(3)
led.off() I was only able to get the LED to work on one of the two Pico 2Ws that I ordered though. I'm assuming the LED is defective on that board. Thanks again |
OK, yes, I think Raspberry Pi use "LED" for both the Pico and PicoW. The "LEDW" is a workaround because the Pimoroni version has to support all of Pico Plus 2, Pico Plus 2 + RM2 and Pico Plus 2 W from the same firmware. You can check to see whether you are setting the LED pin by reading back the pin value: >>> led = Pin("LED", Pin.OUT)
>>> led.value(1)
>>> led.value(0)
>>> led.value()
0
>>> led.value(1)
>>> led.value()
1 |
The LED is being set, so it must be this board.
|
I've messed around with a bunch of the u2f's here, currently on the wireless, the hardware is a pimoroni pico plus 2w. I'm rusty and going back through the fundamentals for fun I'm doing the "Getting started w/Micropython" printed by RPI. This is a simple example, you setup an input as a pull down and then hook it up to a button who's other connection is the 3.3V rail. You do a simple while loop and it prints "you pressed the button" if you press it, or nothing if you dont. Well.. its goofed up, I've tried several pins and they all seem to behave the same. Yank the power plug to start fresh the value of the pin is 0 (pull down resistor), you push the button once, it changes to 1 and prints you pushed the button, then it keeps on doing that (meaning the value is jammed at 1 and saying you pushed the button when I did not. To prove I wasn't losing my mind since at this point its stuck printing 1/button pushed even if you reset you have physically remove power from it to reset it. I hooked up an LED to the button, works like you would expect, push button, LED lights up, dont push button LED doesnt light up. Sometimes is screwed in the code. Like I said I tried multiple pins and the LED (not onboard) proves the code is correct. The pico is just doing whatever it wants.. The Book's code:
The output even after restarting your IDE
here's what it looks like if you yank the cord, notice it starts off as expected then its a runaway train..
Thoughts? I cant make it past the first simple program in the RPI beginner book! and I've programmed a lot in the past with Picos/MP. |
Sounds like the excess leakage issue .. https://hackaday.com/2024/09/20/raspberry-pi-rp2350-e9-erratum-redefined-as-input-mode-leakage-current/ However, it's not related to this issue, which is about pin naming. |
@anglerfish27 I've replied over on #27 :) |
from machine import Pin
led = Pin("LEDW", Pin.OUT)
led.on()
hangs when run after board reset. LED turns on but REPL does not return a prompt.
If the wifi is set up first and connected then the same code works as expected without hanging.
P.S. Why "LEDW" and not "LED"?
The text was updated successfully, but these errors were encountered: