Skip to content

Getting started

Paul edited this page Oct 19, 2023 · 3 revisions
  • First of all open a folder and run > MicroPico > Configure Project command via Ctrl+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.

Clone this wiki locally