Pico-W-Go provides code auto-completion and allows you to communicate with your Raspberry Pi Pico (W) board using the built-in REPL console. Run a single file on your board, sync your entire project or directly type and execute commands.
Auto-completion based on Raspberry Pi Pico W MicroPython firmware: rp2-pico-w-20230113-unstable-v1.19.1-796-gf4811b0b4.uf2
This software is originally based on Pico-Go by cpwood.
Works with:
Platform | Architectures |
---|---|
Windows | x64 |
macOS | x64, arm64 |
Linux | x64, arm64, armv7 |
- Auto-completion and docs
- Console integration for communication with MicroPython REPL on the pico (w) board
- Running/Transferring files to/from your board
- Built-in FTP-Server for transferring files to and from the pico.
-
MicroPython firmware flashed onto the Raspberry Pi Pico (W):
- See raspberry pi docs for help.
-
Python 3.9 or newer installed on your system and in your PATH.
Visual Studio Code extensions:
- ms-python.python
- visualstudioexptteam.vscodeintellicode
- ms-python.vscode-pylance
Environment:
On most Linux installations the device file of the Pico serial port is owned by root and a group you normal don't have by default. This leads to timeout and access denied errors when Pico-W-Go tries to connect to the Pico. There are two ways how to solve this problem:
- Run VS Code in sudo (NOT RECOMMENDED)
- Add the group who "owns" the serial port file to your current user. You can easily do this by downloading and executing the
scripts/solvePermissions.sh
script. However you have to change the marked line in the script if you raspberry pi pico (w) does not connect to/shows up as/dev/ttyACM0
to the correct device file.
# download scripts/solvePermissions.sh
wget https://raw.githubusercontent.com/paulober/Pico-W-Go/main/scripts/solvePermissions.sh
# maybe not required
chmod +x ./solvePermissions.sh
# run the script
./solvePermissions.sh
-
First of all open a folder and run
Pico-W-Go > 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 time import sleep
pin = Pin("LED", Pin.OUT)
while True:
pin.toggle()
sleep(1)
This extension contributes the following settings:
picowgo.autoConnect
: Ignores any 'device address' setting and automatically connects to the top item in the serialport list.picowgo.manualComDevice
: If autoConnect is set to false Pico-W-Go will automatically connect to the serial port specified.picowgo.syncFolder
: This folder will be uploaded to the pyboard when using the sync button. Leave empty to sync the complete project. (only allows folders within the project). Use a path relative to the project you opened in vscode, without leading or trailing slash.picowgo.syncAllFileTypes
: If enabled, all files will be uploaded no matter the file type. The list of file types below will be ignored.picowgo.syncFileTypes
: All types of files that will be uploaded to the board, seperated by comma. All other filetypes will be ignored during an upload (or download) action.picowgo.pyIgnore
: Comma separated list of files and folders to ignore when uploading (no wildcard or regular expressions supported).picowgo.ctrlCOnConnect
: Stops all running programs when connecting to the board.picowgo.openOnStart
: Automatically open the Pico-W-Go console and connect to the board after starting VS Code.picowgo.statusbarButtons
: Select which buttons to show in the statusbar (DO NOT CHANGE, unless you know what you are doing)picowgo.safeBootOnUpload
: [Only works with firmware v1.16.0.b1 and up.] Safe boots the board before uploading to prevent running out of memory while uploading. But adds about 2 seconds to the upload procedure.picowgo.rebootAfterUpload
: Reboots your board after any upload or download action. Usefull if you are developing withmain.py
orboot.py
.picowgo.fastUpload
: Uploads files in bigger chunks (multiplies the upload chunk size by a constant multiplier, see config.ts for values). This can speed up the upload process, but can also cause problems with some boards ('memory overflow'). If you experience problems with uploading, try disabling this option.picowgo.autoconnectComportManufacturers
: List of all the comport manufacturers supported for the autoconnect feature. Defaults toMicroPython
andMicrosoft
.picowgo.ftpPassword
: Password for FTP authentication. The username is 'pico'.picowgo.pythonPath
: Path to the Python interpreter. Defaults to null so it will try to auto-detect a suitable python installation.
- Most doc-strings for MicroPython functions (descriptions/hints) are from docs.micropython.org by © 2014-2022 Damien P. George, Paul Sokolovsky, and contributors.
- For licensing purposes: As of version 2.0.0 i completely moved to project to a Typescript codebase, removed unused code, rewrote many parts to work with new dependencies or just to confirm Typescript code-style. I also altered many dependencies and removed unused or duplicate code. In the future many other parts which are more or less copied from the fork base (cpwood/Pico-Go and it's base project) will be replaced step by step.
The project is based on github.com/cpwood/Pico-Go which is a derivative product of Pymakr by Pycom Limited:
https://marketplace.visualstudio.com/items?itemName=pycom.Pymakr
Original software is Copyright (c) 2017, Pycom Limited.
This software is licensed under the GNU GPL version 3 or any later version, with permitted additional terms. For more information see the Pycom Licence v1.0 document supplied with this file, or available at https://www.pycom.io/opensource/licensing