Hey,
Im new to programming Pis and never did it before. Bought myself a Pico 1 (
https://www.amazon.de/dp/B08TZX8X9V?ref=ppx_yo2ov_dt_b_fed_asin_title ). Read some HowTo`s and guides and wanted to start.
First thing, very easy. Put in a button and print out the state of the button (True/False). Just be easy peasy, but I cant get it working....
I have the Pico, connected it via USB to my PC. As an IDE I am using Thonny and I installed CircuitPython 9.XX on it., by clicking on the bottom right corner. Selected CircuitPython, selected Pico 1 and pressed install.
So far, so good. Everything worked. First test was to turn on the onbuild LED. That worked. Easy
Next step was the button. In my head (and in all tutorials), I just had to connect one side of the button to 3.3V OUT, the other side to any GP Pin. So I selected GP13.
Then I ran the following code:
(check the first pic, else the message is to long)
easy code. It prints out the value of the button all the time and it should turn on the LED while pressing.
But that does not work... If I press the button, nothing happen. The button.value is still False.
Rechecked my wires, everything looks good.
My first thought was a bad button. But no, I measured it, it works. I measured the outgoing voltage of the 3.3V Output (Pin 36) and it was 3.3V. Measured the resistance between the 3.3VOUT and the GP13. No connection, then I pressed the button and there was a connection. So my wires are fine. So it has to be either the code or some kind of setting.
Since I pretty much copy+pasted the code from here (
https://learn.adafruit.com/getting-started-with-raspberry-pi-pico-circuitpython/blinky-and-a-button ), I dont think it is the code.
First I thought it is probably some kind of bad connection/wrong circuitPython version/wrong port etc, but since I can control the onboard LED, it has to be the code.
Anyone can help?