Updating Pi Pico with MicroPython kills the flash drive
Posted: Wed Jan 12, 2022 8:21 pm
Here's what I've done:
1. Held reset while powering up Pi Pico
2. File manager shows flash drive Rp1-Rp2 (D:)
3. Copied MicroPython update file: rp2-pico-20210902-v1.17.UF2 to flash Rp1-Rp2 (D:)
4. Flash drive Rp1-Rp2 (D:) disappears from file manager
5. Openned CoolTerm and hit "connect" ;it shows Com3 /9600 8 N-1, and REPL prompt
6. typed the following script after REPL prompt:
>>> from machine import Pin
>>> from time import sleep
>>> led = Pin(25, Pin.OUT)
>>> while True:
... led.toggle()
... sleep(0.1)
...
And the LED on Pi Pico is now blinking at 10Hz rate. This shows that Pi Pico is working properly.
However, file manager does not show any flash drive.
7. Openned Thonny v3.3.13 and started typing the same script as above:
Python 3.7.9 (bundled)
>>> from machine import Pin
Traceback (most recent call last):
File "<pyshell>", line 1, in <module>
ModuleNotFoundError: No module named 'machine'
>>>
I decided to update the Pi Pico with CIRCUITPYTHON
1. Held reset while powering up Pi Pico
2. File manager shows flash drive: CIRCUITPY (D:)
3. Copied file: adafruit-circuitpython-raspberry_pi_pico-en_US-7.2.0-alpha.1.UF2 to flash drive CIRCUITPY (D:)
4. Copied a script file named main.py and containing the 10 Hz blinking program to the flash drive
5. Openned Thonny with file main.py selected from the Pi Pico flash drive
6. Hit "run current script" and this shows in shell:
Python 3.7.9 (bundled)
>>> %cd 'D:\'
>>> %Run main.py
Traceback (most recent call last):
File "D:\main.py", line 1, in <module>
from machine import Pin
ModuleNotFoundError: No module named 'machine'
It seems circuitpython doesn't know about Raspberry Pi Pico.
My main problem is still -How to make Pi Pico execute a script on powering up.
Can anyone help with this problem?
1. Held reset while powering up Pi Pico
2. File manager shows flash drive Rp1-Rp2 (D:)
3. Copied MicroPython update file: rp2-pico-20210902-v1.17.UF2 to flash Rp1-Rp2 (D:)
4. Flash drive Rp1-Rp2 (D:) disappears from file manager
5. Openned CoolTerm and hit "connect" ;it shows Com3 /9600 8 N-1, and REPL prompt
6. typed the following script after REPL prompt:
>>> from machine import Pin
>>> from time import sleep
>>> led = Pin(25, Pin.OUT)
>>> while True:
... led.toggle()
... sleep(0.1)
...
And the LED on Pi Pico is now blinking at 10Hz rate. This shows that Pi Pico is working properly.
However, file manager does not show any flash drive.
7. Openned Thonny v3.3.13 and started typing the same script as above:
Python 3.7.9 (bundled)
>>> from machine import Pin
Traceback (most recent call last):
File "<pyshell>", line 1, in <module>
ModuleNotFoundError: No module named 'machine'
>>>
I decided to update the Pi Pico with CIRCUITPYTHON
1. Held reset while powering up Pi Pico
2. File manager shows flash drive: CIRCUITPY (D:)
3. Copied file: adafruit-circuitpython-raspberry_pi_pico-en_US-7.2.0-alpha.1.UF2 to flash drive CIRCUITPY (D:)
4. Copied a script file named main.py and containing the 10 Hz blinking program to the flash drive
5. Openned Thonny with file main.py selected from the Pi Pico flash drive
6. Hit "run current script" and this shows in shell:
Python 3.7.9 (bundled)
>>> %cd 'D:\'
>>> %Run main.py
Traceback (most recent call last):
File "D:\main.py", line 1, in <module>
from machine import Pin
ModuleNotFoundError: No module named 'machine'
It seems circuitpython doesn't know about Raspberry Pi Pico.
My main problem is still -How to make Pi Pico execute a script on powering up.
Can anyone help with this problem?