PROBLEM IN THONNY’S BACK-END: Exception while handling ‘Run’ (ConnectionError: read failed: [Errno 6] Device not configured).
See Thonny’s backend.log for more info.
You may need to press “Stop/Restart” or hard-reset your MicroPython device and try again.
Process ended with exit code 1.
Couldn’t find the device automatically.
Check the connection (making sure the device is not in bootloader mode) or choose
“Configure interpreter” in the interpreter menu (bottom-right corner of the window)
to select specific port or another interpreter.
Process ended with exit code None.
from machine import Pin
from time import sleep
led = Pin(20, Pin.OUT)
button = Pin(21, Pin.IN, Pin.PULL_DOWN)
while True:
led.value(button.value())
sleep(0.1)
print(button.value())
Hi.
Did you flash your board with micro python firmware before trying to run code for the first time?
Regards.
Sara
Hello Sara
Thank you in advance for your help.I find the ebook about the Raspberry pico W very good.
I skipped finally the first example.
Than I did all the other examples with succes.
I am now starting with the interrupt example.
I also noticed that I can not blink the led on the board but if I connect a led +resistor at GP0 (pin1 of board) than the external led flickers.
So I did :
– breathing_led_pag122.py,
-led_dimmer_pag130.py,
-picozer_internal temperature_pag139.py and the
-Temperature_board _sensor_pag134.py with succes.
I work with macOS Catalina version 10.15.7 .
I bought my board at amazon.de .Look the same as the one in the book.
Any suggestion is welcome.
Thank you
Hello Sara
I found a solution to the problem:
from machine import Pin
from time import sleep
led = Pin(20, Pin.OUT)
button = Pin(16, Pin.IN, Pin.PULL_DOWN)
while True:
buttonvalue=button.value()
led.value(button.value())
sleep(0.1)
print(button.value())
Connecting the button to an other GP pin such as 16 or 22 works fine…
In the ebook pag 106 the button is connected to pin 21.
Any explanation?
crosstalk between pin 20 and 21 ?
Best regards
Jozef Lodeweyckx
PS:At pag 120 :
-
The frequency of the PWM signal can range between 8Hz and 62.5MHz, while
Is it not 62.5KHz ?
Hi.
Can you share a picture of your board? Perhaps you have a slighlty different version?
To share a picture, upload it to google drive or imgur and then share a link to the file.
I’ll try to confirm that information.
Regards,
Sara