• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

problem with first example module 4 Pico W does not work (error message)

Q&A Forum › problem with first example module 4 Pico W does not work (error message)
0 Vote Up Vote Down
Jozef Lodeweyckx asked 1 year ago

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())

5 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 1 year ago

Hi.
Did you flash your board with micro python firmware before trying to run code for the first time?
Regards.
Sara

0 Vote Up Vote Down
Jozef Lodeweyckx answered 1 year ago

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

0 Vote Up Vote Down
Jozef Lodeweyckx answered 1 year ago

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 ?
0 Vote Up Vote Down
Sara Santos Staff answered 1 year ago

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

0 Vote Up Vote Down
Jozef Lodeweyckx answered 12 months ago

It is assumed that there is some crosstalk at the board level.
Sara confirmed that this can happen.Thank you for your help.

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025
  • [eBook Updated] Learn ESP32 with Arduino IDE eBook – Version 3.2 April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.