-
Notifications
You must be signed in to change notification settings - Fork 27
Getting started
-
First of all open a folder and run
> MicroPico > Configure Project
command viaCtrl+Shift+P
(or the equivalent on your platform) VS Code command palette. This will import stubs for autocompletion and the settings into your project folder. For the auto-completion to work, the extension prompts you (after project configuration) to install recommended extensions mentioned in #Requirements. -
Have the onboard LED flashing in under 5 minutes:
Note that accessing the onboard LED is slightly different for the Pico W compared with the Pico (Page 15 Chapter 3.4). So, you can use the following script in place of
flash.py
:
from machine import Pin
from utime import sleep
pin = Pin("LED", Pin.OUT)
print("LED starts flashing...")
while True:
try:
pin.toggle()
sleep(1) # sleep 1sec
except KeyboardInterrupt:
break
pin.off()
print("Finished.")
-
To run your program, run
> MicroPico > Run current file on Pico
in your Python file's tab. You can also use the status bar button "Run " at the bottom of VS Code window. -
To stop the execution of the currently running program, run
> MicroPico > Stop execution
. The "Stop" button at the status bar does the same.
MicroPico's main developer is not a native English speaker. Feel free to create an issue if you spot a grammar or style error in the wiki.