Code Monkey home page Code Monkey logo

paulober / micropico Goto Github PK

View Code? Open in Web Editor NEW
248.0 9.0 24.0 27.32 MB

MicroPico (aka Pico-W-Go) is a Visual Studio Code extension designed to simplify and speed up the development of MicroPython projects for the Raspberry Pi Pico and Pico W boards.

Home Page: https://marketplace.visualstudio.com/items?itemName=paulober.pico-w-go

License: Mozilla Public License 2.0

JavaScript 2.51% PowerShell 11.36% TypeScript 83.91% Shell 1.58% CSS 0.64%
micropython micropython-rpi-pico raspberry-pi-pico raspberry-pi-pico-w vscode

micropico's Introduction

MicroPico Visual Studio Code Extension (aka Pico-W-Go)

New Feature: Experimental ESP32-WROOM, ESP32-C3, ESP32-S3 and Teensy 4.0 support! (Use the Switch Stubs command to get auto-completion for the ESP32 port of MicroPython.)

MicroPico is a Visual Studio Code extension designed to simplify and accelerate the development of MicroPython projects for the Raspberry Pi Pico and Pico W boards. This tool streamlines the coding process, providing code highlighting, auto-completion, code snippets, and project management features, all tailored for the seamless development experience with MicroPython on Raspberry Pi Pico and Pico W microcontrollers.

Included auto-completion based on Raspberry Pi Pico W MicroPython firmware: RPI_PICO_W-20240105-v1.22.1.uf2 from the micropython-stubs project

Works with:

Platform x64 arm64 armhf
Windows
macOS
Linux ⚠️

⚠️ Support for Linux armhf was dropped with v3.7.7 due to the lack of a suitable build environment. If you need support for armhf, please open an issue on GitHub.

Features

  • Auto-completion with docs
  • Pseudo terminal integration for communication with MicroPython REPL on a Pico (w) board (with support for tab-completion)
  • Running / Transferring files to / from your board
  • Built-in virtual-workspace provider for Raspberry Pi Pico (W) boards (does disable Pylance auto-completion)
  • Switch between auto-completion and IntelliSense for MicroPython ports RPi Pico, RPi Pico (W) and ESP32 (requires pip installed an in PATH)
  • Device Manager UI for managing wifi connection and installing mip packages (only on Pico-W; experimental)
  • ESP32-WROOM-32, ESP32-C3 and Teensy 4.0 support (experimental)

Preview

Requirements

Visual Studio Code extensions:

  • ms-python.python | [Install] [Show]
  • visualstudioexptteam.vscodeintellicode | [Install] [Show]
  • ms-python.vscode-pylance | [Install] [Show]

Environment (Linux only):

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 (except on Raspberry Pi OS). This leads to timeout and access denied errors when MicroPico tries to connect to the Pico. There are three ways how to solve this problem:

Getting started

  • 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.


Problems with Anti-Virus Software (mostly Windows)

Sometimes after a new release of pyboard-serial-com (the underlying npm packge for communication with the board) some anti-virus software might block the execution of the extension. To fix this, make sure to update your local anti-virus definitions. If this doesn't help, open a new issue on GitHub and/or report the false-positive to your anti-virus vendor. Depending on the anti-virus software you are using, you might be able to whitelist the exectuable in pyboard-serial-com that is blocked by your anti-virus software.

Extension Settings

This extension contributes the following settings:

  • micropico.autoConnect: Ignores any 'device address' setting and automatically connects to the top item in the serial-port list (of Picos).
  • micropico.manualComDevice: If autoConnect is set to false MicroPico will automatically connect to the serial port specified here.
  • micropico.syncFolder: This folder will be uploaded to the pyboard when using the upload-project command/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.
  • micropico.additionalSyncFolders: Specifies additional folders that can be selected as upload sources when uploading a project. If left empty, the sync will be performed based on the folder specified in the 'syncFolder' setting. Only folders within the project are allowed. Specify the path relative to the project you have opened in Visual Studio Code, without a leading or trailing slash.
  • micropico.syncAllFileTypes: If enabled, all files will be uploaded no matter the file type. The list of file types below will be ignored.
  • micropico.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.
  • micropico.pyIgnore: Comma separated list of files and folders to ignore when uploading relative to syncFolder (no wildcard or regular expressions supported except **/<file|folder> to exclude an item by its name in every sub folder). Use <additionalSyncFolder>:file/to/exclude.py to create sync folder exclusive exclusion rules (all other rules will always be applied relative to the selected sync folder). Replace additionalSyncFolder with a value from your micropico.additionalSyncFolders setting or the value from micropico.syncFolder.
  • micropico.openOnStart: Automatically open the MicroPico terminal (Pico (W) vREPL) and connect to the board after starting VS Code.
  • micropico.statusbarButtons: Select which buttons to show in the statusbar (DO NOT CHANGE, unless you know what you are doing)
  • micropico.gcBeforeUpload: Run garbage collection before uploading files to the board. This will free up some memory usefull when uploading large files but adds about a second or two to the upload process.
  • micropico.softResetAfterUpload: Soft-resets your board after any upload action. Usefull if you are developing with main.py or boot.py.
  • micropico.executeOnConnect: Path to a MicroPython script on the Pico to execute on connect. Leave empty to disable. (must be relative to the root of the Pico's filesystem; doesn't need to begin with a slash; overrides micropico.openOnStart setting)
  • micropico.importOnConnect: A MicroPython module to import in vREPL on connect. Leave empty to disable.

Extension Context Keys

  • micropico.isActivated: set when the extension is activated
  • micropico.isConnected: set when the extension is connected to a Pico

Note

  • Most doc-strings for MicroPython functions (descriptions/hints) are from docs.micropython.org by © 2014-2023 Damien P. George, Paul Sokolovsky, and contributors.
  • For licensing purposes: Prior to version v3.0.0 of this extension the codebase was a fork of github.com/cpwood/Pico-Go which is a derivative product of Pymakr by Pycom Limited.

micropico's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

micropico's Issues

SoftI2C stub is incorrect in RP2 port

SoftI2C stub is asking for an id parameter. This only exists for hardware I2C.

This is correct:
t = machine.SoftI2C(scl=machine.Pin(4),sda=machine.Pin(5),freq=400000)

This is incorrect:

t = machine.SoftI2C(0,scl=machine.Pin(4),sda=machine.Pin(5),freq=400000)
Traceback (most recent call last):
File "", line 1, in
TypeError: extra keyword arguments given

Pylance is not happy with it:

i2c = machine.SoftI2C(scl=machine.Pin(sclpin),
sda=machine.Pin(sdapin),
freq=i2cfreq)

Expected 1 more positional argumentPylancereportGeneralTypeIssues
(module) machine

It seems that this has changed in v1.14 in 2021 so this is quite old since the latest is 1.19
https://github.com/micropython/micropython/releases

Breaking changes in this release are:
machine.I2C and machine.SPI constructors are changed when using software-based I2C and SPI. Code that constructed I2C/SPI peripherals in the following way will need to be changed (or else their use will emit a warning which will eventually be an error):

machine.I2C(-1, ...)            ->  machine.SoftI2C(...)
machine.I2C(scl=scl, sda=sda)   ->  machine.SoftI2C(scl=scl, sda=sda)

machine.SPI(-1, ...)            ->  machine.SoftSPI(...)
machine.SPI(sck=sck, mosi=mosi, miso=miso)
                    ->  machine.SoftSPI(sck=sck, mosi=mosi, miso=miso)

Problems with uploading/downloading a project

What are the steps to reproduce this issue?

  1. connect the Pico H on VSCode and configure a new project with Pico-W-Go
  2. create a script MicroPython like blinking a LED
  3. when uploading project, nothing happen. Run "uploading project" infinitely

What happens?

If I connect the pico, I have two windows :
Pico vREPL not open and Connection to Pico lost

What were you expecting to happen?

Any logs, error output, etc?

(To get extension logs see Terminal > Output > Protcoll (Extensionhost) and copy output concerning picowgo)
(If it’s long, please paste to https://gist.github.com and insert the link here)

Any other comments?

Support info

Copy this from the Help -> Info/About -> Copy option in Visual Studio Code:

< Paste Here >
<img width="436" alt="MicrosoftTeams-image" src="https://user-images.githubusercontent.com/57638385/231547788-f0e8a9b7-e579-40c9-895f-4eb02a45c256.png">

Configure project fails on VSCode 1.74.2 on MacOS 12.6

What are the steps to reproduce this issue?

Updated Python to 3.10.4 (via brew)
Installed dependencies pylons and microphone-cli via pip3
Installed Pico-W-Go ver 2.1.4 in vscode 1.74.2
created and opened new directory
tried Configure Project

What happens?

Command 'Pico-Go > Configure project' resulted in an error (command 'picogo.initialise' not found)

In fact any command fails with a similar error message.....

What were you expecting to happen?

Any logs, error output, etc?

(To get extension logs see Terminal > Output > Protcoll (Extensionhost) and copy output concerning picowgo)
(If it’s long, please paste to https://gist.github.com and insert the link here)

Any other comments?

Support info

Copy this from the Help -> Info/About -> Copy option in Visual Studio Code:

Version: 1.74.2
Commit: e8a3071ea4344d9d48ef8a4df2c097372b0c5161
Date: 2022-12-20T10:26:09.430Z (2 wks ago)
Electron: 19.1.8
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: 10.2.154.15-electron.0
OS: Darwin x64 21.6.0
Sandboxed: No

command 'picowgo.listCommands' not found

What are the steps to reproduce this issue?

  1. New install of extension
  2. try to open the "All commands"

What happens?

  • Error-windows with "command 'picowgo.listCommands' not found"

Support info

Version: 1.70.2 (user setup)
Commit: e4503b30fc78200f846c62cf8091b76ff5547662
Date: 2022-08-16T05:35:13.448Z
Electron: 18.3.5
Chromium: 100.0.4896.160
Node.js: 16.13.2
V8: 10.0.139.17-electron.0
OS: Windows_NT x64 10.0.19044

Add 'Pico Console' to available terminals

I've never worked on a VSCode extension myself, but from UX point of view, it does feel like an oddity that it always forces a terminal to be opened. It would feel better if the Pico Console was available in the list of available terminals, and could be opened and closed freely.

Originally posted by @aaaaahaaaaa in #21 (comment)

Cannot use REPL console.

What are the steps to reproduce this issue?

  1. Open VSCode.
  2. Open a Pico W Go project.
  3. Wait.

What happens?

A dialog show the "Unable to start the terminal".

What were you expecting to happen?

Show REPL console terminal.

Any logs, error output, etc?

(If it’s long, please paste to https://gist.github.com and insert the link here)
Platform: Ubuntu
VSCode version: 1.70.2

Any other comments?

Support info

Copy this from the Help -> Info -> Copy option in Visual Studio Code:
Version: 1.70.2
Commit: e4503b30fc78200f846c62cf8091b76ff5547662
Date: 2022-08-16T05:36:25.715Z
Electron: 18.3.5
Chromium: 100.0.4896.160
Node.js: 16.13.2
V8: 10.0.139.17-electron.0
OS: Linux x64 5.4.0-96-generic

< Paste Here >

Manual Connect doesn't work: 'Address not configured. Please go to the settings to configure a valid address or comport'

What are the steps to reproduce this issue?

  1. Install extension
  2. Change two things in the global settings:
    "auto_connect":true,"manual_com_device":"COM7",
  3. Click on the "Pico W Disconnected" button in the bottom left

What happens?

I get an error message: Address not configured. Please go to the settings to configure a valid address or comport

What were you expecting to happen?

The extension tries to connect to COM7 and either connects or doesn't connect, but shows an appropriate error message.

Any logs, error output, etc?

see above

Any other comments?

First of all, thank you for continuing the development of this great extension.
I already tried a lot, but other forums don't know this extension, so I hope you can help.

Support info

When I clicked on 'All commands' > 'Help > Get Support Info', nothing was outputted in the terminal, but the other buttons still printed output afterwards, so the extension did not crash.
I also recorded a video with everything (keep in mind this is a completely fresh install of the extension):

bug.video.mp4
< Paste Here >

Failed to connect to com port

What are the steps to reproduce this issue?

  1. Plug in my Pico W
  2. Launch VSCode with Pico-W-Go installed and enabled

What happens?

Terminal shows:
(AutoConnect enabled, ignoring 'manual com port' address setting)
Searching for boards on serial devices...
Connecting to COM4...

If I close VSCode and open Thonny, it automatically opens COM4 and gives me the REPL prompt.

Device Manager shows: USB Serial Device (COM4)

I rebooted to make sure nothing else was using COM4 but it did not help.

What were you expecting to happen?

I was expecting COM4 to be opened.

I saw an earlier post about disabling Auto Connect and manually specifying a COM port but that did not help so I reverted to auto connect.

Any logs, error output, etc?

(To get extension logs see Terminal > Output > Protcoll (Extensionhost) and copy output concerning picowgo)
(If it’s long, please paste to https://gist.github.com and insert the link here)
2023-03-19 07:49:14.179 [info] Extension host with pid 15076 started
2023-03-19 07:49:14.179 [info] Skipping acquiring lock for c:\Users\ken\AppData\Roaming\Code\User\workspaceStorage\c1c2ea82a97bb4735bd875400adb74c7.
2023-03-19 07:49:14.496 [info] ExtensionService#_doActivateExtension vscode.github-authentication, startup: false, activationEvent: 'onAuthenticationRequest:github'
2023-03-19 07:49:14.528 [info] ExtensionService#_doActivateExtension vscode.emmet, startup: false, activationEvent: 'onLanguage'
2023-03-19 07:49:14.538 [info] ExtensionService#_doActivateExtension vscode.git-base, startup: true, activationEvent: '', root cause: vscode.git
2023-03-19 07:49:14.544 [info] ExtensionService#_doActivateExtension christian-kohler.path-intellisense, startup: true, activationEvent: '
'
2023-03-19 07:49:14.597 [info] ExtensionService#_doActivateExtension curdeveryday.vscode-m5stack-mpy, startup: true, activationEvent: ''
2023-03-19 07:49:14.693 [info] ExtensionService#_doActivateExtension Shan.code-settings-sync, startup: true, activationEvent: '
'
2023-03-19 07:49:15.232 [info] ExtensionService#_doActivateExtension WallabyJs.quokka-vscode, startup: true, activationEvent: ''
2023-03-19 07:49:15.245 [info] ExtensionService#_doActivateExtension paulober.pico-w-go, startup: true, activationEvent: 'workspaceContains:.picowgo'
2023-03-19 07:49:15.849 [info] ExtensionService#_doActivateExtension vscode.git, startup: true, activationEvent: '
'
2023-03-19 07:49:15.881 [info] ExtensionService#_doActivateExtension vscode.github, startup: true, activationEvent: ''
2023-03-19 07:49:16.205 [info] ExtensionService#_doActivateExtension vscode.microsoft-authentication, startup: false, activationEvent: 'onAuthenticationRequest:microsoft'
2023-03-19 07:49:16.230 [info] ExtensionService#_doActivateExtension ms-python.python, startup: true, activationEvent: 'workspaceContains:
.py', root cause: ms-python.isort
2023-03-19 07:49:18.450 [info] ExtensionService#_doActivateExtension ms-python.isort, startup: true, activationEvent: 'workspaceContains:*.py'
2023-03-19 07:49:19.843 [info] Eager extensions activated
2023-03-19 07:49:20.897 [info] ExtensionService#_doActivateExtension vscode.debug-auto-launch, startup: false, activationEvent: 'onStartupFinished'
2023-03-19 07:49:20.899 [info] ExtensionService#_doActivateExtension vscode.merge-conflict, startup: false, activationEvent: 'onStartupFinished'
2023-03-19 07:49:20.906 [info] ExtensionService#_doActivateExtension ms-vscode-remote.remote-wsl-recommender, startup: false, activationEvent: 'onStartupFinished'
2023-03-19 07:49:20.918 [info] ExtensionService#_doActivateExtension dbaeumer.vscode-eslint, startup: false, activationEvent: 'onStartupFinished'
2023-03-19 07:49:20.935 [info] ExtensionService#_doActivateExtension GitHub.copilot, startup: false, activationEvent: 'onStartupFinished'
2023-03-19 07:49:21.146 [info] ExtensionService#_doActivateExtension GitHub.vscode-pull-request-github, startup: false, activationEvent: 'onStartupFinished'
2023-03-19 07:49:21.190 [info] ExtensionService#_doActivateExtension ms-vscode-remote.remote-containers, startup: false, activationEvent: 'onStartupFinished'
2023-03-19 07:49:21.275 [info] ExtensionService#_doActivateExtension PKief.material-icon-theme, startup: false, activationEvent: 'onStartupFinished'
2023-03-19 07:49:21.511 [info] ExtensionService#_doActivateExtension vscode.configuration-editing, startup: false, activationEvent: 'onLanguage:jsonc'
2023-03-19 07:49:21.517 [info] ExtensionService#_doActivateExtension vscode.json-language-features, startup: false, activationEvent: 'onLanguage:jsonc'
2023-03-19 07:49:21.545 [info] ExtensionService#_doActivateExtension vscode.typescript-language-features, startup: false, activationEvent: 'onLanguage:jsonc'
2023-03-19 07:49:21.563 [info] ExtensionService#_doActivateExtension ms-dotnettools.vscode-dotnet-runtime, startup: false, activationEvent: 'onLanguage:jsonc', root cause: ms-azuretools.vscode-bicep
2023-03-19 07:49:22.508 [info] ExtensionService#_doActivateExtension ms-azuretools.vscode-bicep, startup: false, activationEvent: 'onLanguage:jsonc'
2023-03-19 07:49:22.636 [info] ExtensionService#_doActivateExtension msazurermtools.azurerm-vscode-tools, startup: false, activationEvent: 'onLanguage:jsonc'
2023-03-19 07:49:28.963 [error] Error: timeout
at Timeout._onTimeout (c:\Users\ken.vscode\extensions\paulober.pico-w-go-2.1.8-win32-x64\dist\extension.js:2:687995)
at listOnTimeout (node:internal/timers:559:17)
at processTimers (node:internal/timers:502:7)

Any other comments?

OS: Windows 10 (OS Build: 19045.2728)
VSCode: 1.76.2
Pico-W-Go:
More Info
Published 8/10/2022, 10:43:54
Last released 3/4/2023, 06:04:16
Last updated 3/11/2023, 06:43:32
Identifier paulober.pico-w-go

Support info

Copy this from the Help -> Info/About -> Copy option in Visual Studio Code:

Version: 1.76.2 (system setup)
Commit: ee2b180d582a7f601fa6ecfdad8d9fd269ab1884
Date: 2023-03-14T17:55:54.936Z
Electron: 19.1.11
Chromium: 102.0.5005.196
Node.js: 16.14.2
V8: 10.2.154.26-electron.0
OS: Windows_NT x64 10.0.19045
Sandboxed: Yes

CMD Delete all files fail invalid syntax

What are the steps to reproduce this issue?

  1. Connect a Raspberry Pi Pico W board to the ext
  2. Run the "Delete all files from board" command

What happens?

Throws an error of type invalid syntax and no files get deleted.

What were you expecting to happen?

All files on board get deleted.

Any logs, error output, etc?

Traceback (most recent call last):
  File "<stdin>", line 4
SyntaxError: invalid syntax

Any other comments?

N/A

Support info

Copy this from the Help -> Info -> Copy option in Visual Studio Code:

Version: 1.71.0 (user setup)
Commit: 784b0177c56c607789f9638da7b6bf3230d47a8c
Datum: 2022-09-01T07:36:10.600Z
Electron: 19.0.12
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: 10.2.154.15-electron.0
Betriebssystem: Windows_NT x64 10.0.22621
Sandkasten: No

can't seem to install this extension

What are the steps to reproduce this issue?

  1. installing pico w go from extensions page
  2. optional: restart vscode
  3. do anything with the pico w go

What happens?

every pico w go menu crashes saying stuff like it can't start the files
and there is no menu on status bar like it mentioned in the docs

What were you expecting to happen?

that i could use it <3

Any logs, error output, etc?

(If it’s long, please paste to https://gist.github.com and insert the link here)
Screenshot from 2022-08-17 22-07-30

Any other comments?

ubuntu 22.04 vscode installed from snap and updated (if that matters) python 3.10.4
everything updated to last stuff

Support info

Copy this from the Pico-W-Go > Help > Get support info option in the command palette:

it also errors with command not found

First time "Run current file": `No module named ...`, 2nd time imports OK

What are the steps to reproduce this issue?

  1. Follow basic setup instructions
  2. Create a module at the same level as the file to run, e.g. secrets.py
  3. Import the module in the file to run
  4. Click "Run current file"

What happens?

Can't import the module the first time, imports when clicked again.

What were you expecting to happen?

Import the module per normal.

Any logs, error output, etc?

>>> Running c:\Users\sterg\Documents\GitHub\sparks-baird\self-driving-lab-demo\scripts\pico-go-w\microdot_hello.pyTraceback (most recent call last):
  File "<stdin>", line 4, in <module>
ImportError: no module named 'secrets'

>>> Running c:\Users\sterg\Documents\GitHub\sparks-baird\self-driving-lab-demo\scripts\pico-go-w\microdot_hello.py
connected

Any other comments?

Seems to be an "every other time" behavior.

Screencast video

Support info

Copy this from the Pico-W-Go > Help > Get support info option in the command palette:

image

Pico-Go-W v1.5.6
OS: Windows 11 Home

AutoFind port but no auto-connect

Feature Request 🚀

Running tests is cumbersome sometimes

When I need to run my tests, I need to open the comport so I need to disconnect the pico. I want to keep ctr-c on connect because if a loop happens I want to be able to get rid of it. But if I connect my pico to the usb, Pico-W-Go connects and blocks the comport. But if I disable the autoconnect I need manually change the comport.

What I would love to see

An option where autoconnect would be off but the comport was still automaticaly found just like in autoConnect. Pico-W-Go would only connect when I tell it to.

Hangs at "Connecting to /dev/tty.usbmodem"

What are the steps to reproduce this issue?

  1. Trying to connect to my pico using pico-w-go (on a Mac M1 Mini)

What happens?

Terminal hangs at "Connecting to /dev/tty.usbmodem213201..."

What were you expecting to happen?

I expect it to connect to my Pico

Any logs, error output, etc?

  • No error output, just hangs at trying to connect to my pico

Any other comments?

I was able to use pico-w-go to discover my serial ports

Support info

Copy this from the Help -> Info/About -> Copy option in Visual Studio Code:

Version: 1.74.2 (Universal)
Commit: e8a3071ea4344d9d48ef8a4df2c097372b0c5161
Date: 2022-12-20T10:26:09.430Z
Electron: 19.1.8
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: 10.2.154.15-electron.0
OS: Darwin arm64 22.1.0
Sandboxed: No

Wrong char encoding when executing from vscode

What are the steps to reproduce this issue?

  1. Create two python files (see below), so test2.py imports test1.py.
# test1.py
var1 = "a°" # This is a letter "a" and a degree symbol.
# test2.py
from test1 import *

print('var1 from test1:')
print('len: ', len(var1))
print('encode()', var1.encode())
for char in var1:
    print(char)

var2 = "a°" # Same as var2.
print()
print('var2 from test2:')
print('len: ', len(var2))
print('encode()', var2.encode())
for char in var2:
    print(char)
  1. Upload both files to the Pico and execute test2.py using the extension "Run current file" option.

What happens?

The contents of both vars, that should be equals, are not.

>>> Running test2.py
 
var1 from test1:
len:  2
encode() b'a\xc2\xb0'
a
°

var2 from test2:
len:  1
encode() b'a\xb0'
a�

What were you expecting to happen?

var1should contain the same value than var2.

Any logs, error output, etc?

No.

Any other comments?

Executing the same test from Thonny yields the correct results.

var1 from test1:
len:  2
encode() b'a\xc2\xb0'
a
°

var2 from test2:
len:  2
encode() b'a\xc2\xb0'
a
°

It looks like the extension "Run current file" option sends the file with the wrong encoding (not utf8 but latin1, maybe?).

Support info

Versión: 1.73.1
Commit: 6261075646f055b99068d3688932416f2346dd3b
Fecha: 2022-11-09T03:54:53.913Z
Electrón: 19.0.17
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: 10.2.154.15-electron.0
OS: Linux x64 5.19.0-23-generic snap
En espacio aislado: No

Extension crashes on activation

What are the steps to reproduce this issue?

  1. Run Pico-W-Go > Configure project

Or:

  1. Open Pico W vRepl in terminal window

What happens?

Only the activating extensions at the bottom bar appears for a few seconds and then nothing.

image

What were you expecting to happen?

Some configuration to happen and having these options in the bottom bar
image

Or opening the pico repl.

Any logs, error output, etc?

(To get extension logs see Terminal > Output > Protcoll (Extensionhost) and copy output concerning picowgo)
(If it’s long, please paste to https://gist.github.com and insert the link here)

image

Any other comments?

Connecting to pi works inside the Thonny IDE.

Support info

Copy this from the Help -> Info/About -> Copy option in Visual Studio Code:

Version: 1.77.2 (Universal)
Commit: e344f1f539a80912a0e9357cec841f36ce97a4e2
Date: 2023-04-06T10:12:31.126Z
Electron: 19.1.11
Chromium: 102.0.5005.196
Node.js: 16.14.2
V8: 10.2.154.26-electron.0
OS: Darwin x64 22.3.0
Sandboxed: Yes

Uploading Project results in removing all files (?)

Fist and foremost: I am not sure if this is a problem with this plugin, or if my pico is in some weird state because I had to flash-nuke it.

What are the steps to reproduce this issue?

  1. Unsure, but since the flash-nuke it happens here and there
  2. After a hard-reset the upload works normal

What happens?

Instead of the normal Upload info, the following is shown:

Uploading project (main folder)...
Not safe booting, disabled in settings
Uploading to / ...
Reading file status
Deleting 27 files and folders
Removing file hcsr04.py
Removing file controller.py
...
Removing file app.py
Upload done, resetting board...
OK

What were you expecting to happen?

Normally, after uploading the project, I get a progress screen for which files have already been uploaded and afterwards the program starts automatically, neither of that happens

Support info

Copy this from the Help -> Info/About -> Copy option in Visual Studio Code:

Version: 1.75.1 (Universal)
Commit: 441438abd1ac652551dbe4d408dfcec8a499b8bf
Date: 2023-02-08T21:34:59.000Z
Electron: 19.1.9
Chromium: 102.0.5005.194
Node.js: 16.14.2
V8: 10.2.154.23-electron.0
OS: Darwin arm64 22.2.0
Sandboxed: No

Unable to create issue in Pico-W-Stub about autocomplete issue

What are the steps to reproduce this issue?

  1. Attempt to open issue
  2. Notice that it is an auto-complete issue and select the Open open to go to the stubs issue page
  3. As the repo is a fork it doesn't allow its own issues

What happens?

Unable to create an issue in Pico-W-Stub as it is a fork

What were you expecting to happen?

Ability to lodge issue

Any logs, error output, etc?

nil

Any other comments?

Wanting to raise an issue about the autocomplete of machine as the entirety of the file is only a single import statement now. Uncertain if other modules are affected but basically can't use the autocomplete currently 😅

Support info

Running v2.0.6

Copy this from the Help -> Info -> Copy option in Visual Studio Code:

option doesn't exist currently (iirc)?

Run multi-file OOP project from terminal

Feature Request 🚀

When creating multiple files (one per class) and attempting to run main.py from terminal, the following error occurs
Traceback (most recent call last):
File "", line 1, in
ImportError: no module named 'led'

In the test only one class in a file led.py was created and line 1 of main.py was
import led

Have tried running the same code on Thonny and works fine via the terminal. An init.py was created in the project folder too.

Right now the only way to execute a multi-file OOP in micropython is by uploading the project files to the pico in order to test each change.

Duplicate terminals respawn after closeing

"probably related, in my case vscode opens like 4 terminals and i can't seem to close them, they respawn"

Originally posted by @migs35323 in #21 (comment)


When you open VS Code via a short link (desktop or taskbar) after a restart these terminals often remain even if a new one is already created. If you then try to close the old one, they get recreated.

Upload issues with a larger project

What are the steps to reproduce this issue?

  1. clone [email protected]:gilesknap/pico-xmas.git
  2. launch the folder in vscode
  3. connect a pico
  4. Command Pallette Pico-w-Go->Delete all files from board
  5. right click Pico-w-Go->Upload project from file Explorer

What happens?

The files start to upload but after one or two the process stalls
sending a soft reset via the command pallette makes the upload move on to the next file
If this process is repeated a few times and the timing is right then the project does download OK.
If I don't do the soft reset then we see Upload failed.timeout.

The output in the Terminal looks like this

>>> 
Uploading project (main folder)...

Not safe booting, disabled in settings
Uploading to / ...
Reading file status
Creating dir morse
Creating dir utils
[1/6] Writing file '01_start_morse.py' (271 bytes)
[2/6] Writing file '02_count.py' (1 kB)
[3/6] Writing file 'LICENSE' (11 kB)
[4/6] Writing file 'morse/morse_code.py' (1 kB)

What were you expecting to happen?

All project files should upload with no additional intervention.
Thonny is able to upload this without issue.

Any logs, error output, etc?

(To get extension logs see Terminal > Output > Protcoll (Extensionhost) and copy output concerning picowgo)
(If it’s long, please paste to https://gist.github.com and insert the link here)

Any other comments?

Nice project !

Support info

I'm using a pico H not a pico W - does that make a difference?

Version: 1.73.1
Commit: 6261075646f055b99068d3688932416f2346dd3b
Date: 2022-11-09T03:54:53.913Z
Electron: 19.0.17
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: 10.2.154.15-electron.0
OS: Linux x64 5.15.0-56-generic
Sandboxed: No

No stubs installed in VS code

Because the PICO-W-GO extension on VS Code does not work as promised (it does not create stubs), I tried a manual setup to get my stubs:

I followed the docs on https://micropy-cli.readthedocs.io/en/latest/base.html.

First, I installed micropy-cli via pip.
following the docs, creating a new project folder is simple:

Step 1: Excecuting micropy init project1 (in the bash terminal of VS code):
image

So far so good. It comes with 5 features (step 2). I selected them all. Execute a return to the next step:

Step 3: never comes. No selection of target device/firmware (I expected the RP2 stuff here). This is what comes:
image

Step 4: no Boom. No ready workspace! Still no stubs!

This command created a .micropy/ folder under $HOME, with an empty sybfolder /stubs. No symlinks, no micropy.json file and no project 'project1'

OK, no stubs! But a micropy.log file was created. After line 11 there is an error. What means the 1535 after the http code?
image

Not giving up yet. I tried the micropy stubs add <STUB_NAME>, but have not any idea what STUB_NAME to select. Again, after some browsing, with the help of google, I found something useful:

https://github.com/paulober/Pico-W-Stub/blob/main/micropy.md

I downloaded stubs for the RP2 from https://pypi.org/project/micropython-rp2-stubs/#files (the built distibution micropython_rp2_stubs-1.19.1.post6-py3-none-any.whl and unpacked in some folder I made.

To add the stubs, one should execute the command: micropy stubs add "<path to dist/micropy-cli folder in this repo>". What does this mean? There is an example, but that is a windows one and I am in Linux.

Is it a site package in Python? I checked this and found something under pyhon 3.9 sitepackages, at least a folder named stubs under the micropy folder. But my active Python is 3.10.2 And that holds no site packages concerning stubs or micropy.

Strange! I give up! Just following instructions is not working.

This string of actions removed me far from my original goal: starting a project in a Pico-Pi, using VS Code 1.71.2

Back to the good old Thonny IDE

Config additional sync folders per project

Feature Request 🚀

As I manage multiple pico-w projects in the same repository I would appreciate a config setting which would allow me to:

  • set the syncFolder per directory (already supported)
  • allow for "contents only" sync on the "Upload Project" action, for example:
repository-name
-- project-one
---- .picowgo (syncFolder="project-one")
---- main.py
-- project-two
---- .picowgo (syncFolder="project-two")
---- main.py

I would expect that once running the "Upload Project" action from within the project-one directory the project-one/main.py would get uploaded as /main.py to the pico (treating the syncFolder setting as a project target root).

Thanks for considering this!

Upload Project is not uploading any files

What are the steps to reproduce this issue?

  1. Set "src" as the sync folder
  2. Command: Delete all files from the device
  3. Command: Upload Project

What happens?

No files are uploaded.

Uploading project (src)...
Not safe booting, disabled in settings

Uploading to / ...
Reading file status
No files to upload
Upload done

What were you expecting to happen?

All files under "src" folder are uploaded. This used to work but has stopped working now.

Any logs, error output, etc?

(To get extension logs see Terminal > Output > Protcoll (Extensionhost) and copy output concerning picowgo)
(If it’s long, please paste to https://gist.github.com and insert the link here)

Any other comments?

Support info

Copy this from the Help -> Info/About -> Copy option in Visual Studio Code:

< Paste Here >

No I2S class

I can't use the I2S module, because in the machine library there is no I2S class...

File explorer

Feature Request 🚀

Describe the solution you'd like

It would be great to have access to the content of the board as a file explorer from VSCode extension sidebar on the left. It would list the files currently on the Pico and files could also be draggred, dropped or even deleted directly from there.

Cannot upload .html files

What are the steps to reproduce this issue?

  1. Start to work on a .html file.
  2. Click all commands

What happens?

"Upload current file" command doesn't pop up in the available commands.

What were you expecting to happen?

I was expecting this command so I can read this .html file in my main.py script.

Any logs, error output, etc?

Any other comments?

Support info

Connecting a Pico W doesn't trigger a vREPL

What are the steps to reproduce this issue?

  1. open VSCode without a Pico W connected to computer USB or disconnect a Pico and then reconnect it.
  2. connect PicoW to USB

What happens?

Nothing happens when the Pico W is plugged in. I have to create a new vREPL manually in the Terminal window. Sometimes this works first time but usually I have to restart VSCode to get a connected vREPL.

What were you expecting to happen?

The previous version would detect the new Pico and would create a REPL terminal linked to it automatically.

Any logs, error output, etc?

None.

Any other comments?

None.

Support info

Windows 10.

Version: 1.77.1 (user setup)
Commit: b7886d7461186a5eac768481578c1d7ca80e2d21
Date: 2023-04-04T23:21:11.906Z
Electron: 19.1.11
Chromium: 102.0.5005.196
Node.js: 16.14.2
V8: 10.2.154.26-electron.0
OS: Windows_NT x64 10.0.19045
Sandboxed: No

Pico-Go-W > Configure Project Fails

What are the steps to reproduce this issue?

  1. Installed latest version of VS Code plugin
  2. Created empty directory
  3. Ran code .
  4. Tried to run Pico-G-W > Configure Project

What happens?

Command failed, with message 'picowgo.initialise not found'

What were you expecting to happen?

To be able to complete the 'getting started' part of the ReadMe

Any logs, error output, etc?

From the VS Code terminal log, the relevant portion appears to be:

2023-01-16 14:34:33.621 [info] ExtensionService#_doActivateExtension paulober.pico-w-go, startup: false, activationEvent: 'onCommand:picowgo.initialise'
2023-01-16 14:34:33.909 [error] Activating extension paulober.pico-w-go failed due to an error:
2023-01-16 14:34:33.909 [error] Error: No native build was found for platform=linux arch=arm runtime=electron abi=106 uv=1 armv=default libc=glibc node=16.14.2 electron=19.1.8
    loaded from: /home/pi/.vscode/extensions/paulober.pico-w-go-2.1.5-linux-armhf/node_modules/@serialport/bindings-cpp

	at load.path (/home/pi/.vscode/extensions/paulober.pico-w-go-2.1.5-linux-armhf/node_modules/node-gyp-build/index.js:60:9)
	at load (/home/pi/.vscode/extensions/paulober.pico-w-go-2.1.5-linux-armhf/node_modules/node-gyp-build/index.js:22:30)
	at Object.<anonymous> (/home/pi/.vscode/extensions/paulober.pico-w-go-2.1.5-linux-armhf/node_modules/@serialport/bindings-cpp/dist/load-bindings.js:10:46)
	at u._compile (/usr/share/code/resources/app/out/vs/loader.js:4:1313)

This is on a Raspberry Pi 4b, which had completed runinng apt update ; apt upgrade about half an hour previously.

Any other comments?

Support info

Copy this from the Help -> Info/About -> Copy option in Visual Studio Code:

Version: 1.74.3
Commit: 97dec172d3256f8ca4bfb2143f3f76b503ca0534
Date: 2023-01-09T16:53:02.931Z
Electron: 19.1.8
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: 10.2.154.15-electron.0
OS: Linux arm 5.15.84-v7l+
Sandboxed: No

When connected for keyboard shortcuts

Feature Request 🚀

Is your feature request related to a problem? Please describe.

vscode allows me to map picowgo.run to ctrl+enter However I have not been able to find a way to set the "When" for the shortcut to "When picowgo is connected" or something similar

Describe the solution you'd like

Assistance with setting the "When" or perhaps picowgo has to export a variable that can be used in the "When" field

Describe alternatives you've considered

I can set the shortcut to ctrl+enter, but then that breaks jupyter notebooks I may be working on

Extension not working with VSCode 1.71.0 [Linux]

What are the steps to reproduce this issue?

  1. Update to latest VSCode 1.71.0 on linux
  2. Remove Pico-Go and install Pico-W-Go
  3. Try to execute any command (e.g. Upload current file only)

What happens?

An error window pops up: "command 'picowgo.uplodFile' not found"

What were you expecting to happen?

File upload

Any logs, error output, etc?

(If it’s long, please paste to https://gist.github.com and insert the link here)

Support info

Copy this from the Pico-W-Go > Help > Get support info option in the command palette:

This command is not listed !

'run' button in VSCode terminal window doesn't change to 'stop' button so code execution cannot be halted

What are the steps to reproduce this issue?

Connecting a Pico W and running unchanged code.

What happens?

In the previous version, the status bar at the bottom of VSCode (light blue in the attached image) has a 'Run' button, which begins execution of the active file. Once running, this button used to change to a 'Stop' button, which halted execution. The button now does not change to 'Stop' and still says 'Run'. Clicking the button does NOT stop the code now. There seems to be no way to stop the code running other than disconnecting the Pico.

What were you expecting to happen?

'Run'' would change to 'Stop' and clicking 'Stop' would halt code execution (ie unchanged from last version).

Any logs, error output, etc?

None.

Any other comments?

None.

Support info

Version: 1.77.1 (user setup)
Commit: b7886d7461186a5eac768481578c1d7ca80e2d21
Date: 2023-04-04T23:21:11.906Z
Electron: 19.1.11
Chromium: 102.0.5005.196
Node.js: 16.14.2
V8: 10.2.154.26-electron.0
OS: Windows_NT x64 10.0.19045
Sandboxed: No

Screenshot 2023-04-10 205049

unsupported operator errors in typings for `int`s?

What are the steps to reproduce this issue?

  1. Start a project
  2. use Pico-W-Go to generate project files (Configure Project)
  3. attempt to compare integers (e.g., while max_wait > 0:)

What happens?

image

What were you expecting to happen?

no errors

Any other comments?

The stubs packaged with the vanilla Pico-Go extension seem to include more files, and do not exhibit this problem. Removing the typeshed line from the generated pylance settings also removes the operator errors (but of course now complains about micropython imports).

Support info

Copy this from the Help -> Info -> Copy option in Visual Studio Code:

There is no 'Info' option under Help, this is the output from 'About'

Version: 1.70.2 (system setup)
Commit: e4503b30fc78200f846c62cf8091b76ff5547662
Date: 2022-08-16T05:35:13.448Z
Electron: 18.3.5
Chromium: 100.0.4896.160
Node.js: 16.13.2
V8: 10.0.139.17-electron.0
OS: Windows_NT x64 10.0.22622

All the commands related to Pico-W-Go in the command palette of VSCode do not working and shows error message.

What are the steps to reproduce this issue?

  1. Setting -> Command Palette -> Pico-W-Go > Configure project
  2. Setting -> Command Palette -> Pico-W-Go > Connect
  3. Setting -> Command Palette -> Pico-W-Go > Global settings
  4. ...

What happens?

When I want to run the command, it shows an error message box and says Command 'Pico-W-Go > Connect' resulted in an error (command not found)

What were you expecting to happen?

I expect the commands work since I installed Pico-W-Go as an extension in VSCode. I connected and disconnected PicoW and reinstalled VSCode and Pico-W-Go. Also installed the Python version higher than 3.9 and put it in the PATH: export PATH="/Library/Frameworks/Python.framework/Versions/3.9.13/bin:$PATH"

Any logs, error output, etc?

Screenshot 2023-04-14 at 13 42 44

No stubs installed

Installed a fresh VS Code (V 1.71.2) on windows 10, plus extensions Python, Pylance, Intellisense and Pico-W-Go.

Following Pico-W-Go getting started, opened a folder and (ctrl+shift+p) Pico-W-Go configure project. A .vscode folder is being installed, but is empty.
No stub files are created.
afbeelding

Adding installed filesystem modules to extension

I've added a library to my pico via mip directly on the pico (umqtt.simple), but I'm not sure how to pull that into the project in VSCode.

I've done nothing beyond the standard pico-w-go setup, so obviously the extension knows nothing about it:

image

Is there currently a way to pull these into the project?

Cannot run anything since 3.0.0 update

What are the steps to reproduce this issue?

  1. VS Code auto installed the update
  2. Trying to run a code on the Pico or upload, doesn't matter
  3. Installed pyserial correctly, reinstalled Pico-W-Go, even reinstalled the older version

What happens?

VS Code installed the new 3.0.0 update and it broke everything for me. On the newer version, it says ''command 'picowgo.initialise' not found" and it doesn't start. I installed pyserial and reinstalled the Pico-W-Go but it still asks for pyserial everytime (and if i click install pyserial it does nothing, the paths are correct for Python) and crashes with the error above.
I tried rolling back to a previous version but then the REPL doesn't come to life, it says that "Connecting on COM3 (correct)", new line and nothing, i cannot put a single character there, and the Run button simply "time outs", it is like it does something but then nothing happens. The board got the newest firmware and i nuked everyhing from it before.

What were you expecting to happen?

I expect at least the roll-back version to work.

Any logs, error output, etc?

(To get extension logs see Terminal > Output > Protcoll (Extensionhost) and copy output concerning picowgo)
(If it’s long, please paste to https://gist.github.com and insert the link here)
I cannot find logs there.

Any other comments?

pyserialnotofund
initnotfound

Support info

Copy this from the Help -> Info/About -> Copy option in Visual Studio Code:

Version: 1.77.1 (user setup)
Commit: b7886d7461186a5eac768481578c1d7ca80e2d21
Date: 2023-04-04T23:21:11.906Z
Electron: 19.1.11
Chromium: 102.0.5005.196
Node.js: 16.14.2
V8: 10.2.154.26-electron.0
OS: Windows_NT x64 10.0.22621
Sandboxed: No

Unexpected token { in JSON at position 120

What are the steps to reproduce this issue?

  1. Install extension
  2. run "Download" command or try connecting to the FTP server

What happens?

If I try to download the project from my Pico, this gets printed in the console:

Downloading from / ...
Reading files from board
Download failed.Unexpected token { in JSON at position 120
Download done, resetting board...

Similarly, if I connect to the FTP server via FileZilla, this gets printed in the FileZilla console:

Command:	LIST
Response: 	451 Unexpected token { in JSON at position 120

What were you expecting to happen?

Download/FTP to work as expected.

Any logs, error output, etc?

(If it’s long, please paste to https://gist.github.com and insert the link here)

Any other comments?

Support info

Copy this from the Pico-W-Go > Help > Get support info option in the command palette:

Get support info does not print anything...

Upload of picozero library fails

What are the steps to reproduce this issue?

  1. Create a project including picozero library
  2. Upload project to pi pico

What happens?

Upload fails for picozero.py

What were you expecting to happen?

Upload picozero.py

Any logs, error output, etc?

>>>
Uploading project (main folder)...
Not safe booting, disabled in settings

Uploading to / ...
Reading file status
Creating dir lib
Creating dir lib/picozero
[1/3] Writing file 'Hello_World.py' (69 bytes)
[2/3] Writing file 'lib/picozero/__init__.py' (1 kB)
[3/3] Writing file 'lib/picozero/picozero.py' (65 kB)
Upload failed.Hashes do not match between computer and board.
Hashes do not match between computer and board.
Hashes do not match between computer and board.
Hashes do not match between computer and board.
Upload done, resetting board...

MicroPython v1.19.1 on 2022-06-18; Raspberry Pi Pico with RP2040
Type "help()" for more information.
>>>
MPY: soft reboot
MicroPython v1.19.1 on 2022-06-18; Raspberry Pi Pico with RP2040
Type "help()" for more information.
>>>

Any other comments?

It is possible to upload the library with Thonny

Support info

Version: 1.71.2
Commit: 74b1f979648cc44d385a2286793c226e611f59e7
Date: 2022-09-14T21:12:14.256Z
Electron: 19.0.12
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: 10.2.154.15-electron.0
OS: Linux x64 5.19.7-1-MANJARO
Sandboxed: No

Pico-Go status bar is visible in non-pico projects

What are the steps to reproduce this issue?

  1. Install extension
  2. Open any folder in VSCode

What happens?

The Pico-Go status bar appears, no matter if the current folder is a Pico project or not.

What were you expecting to happen?

I would expect the Pico-Go extension, to be loaded only if I'm inside a Pico project.

Any logs, error output, etc?

(If it’s long, please paste to https://gist.github.com and insert the link here)

Any other comments?

Support info

Copy this from the Pico-W-Go > Help > Get support info option in the command palette:

Get support info" does not print anything into console.

Unable to start terminal

What are the steps to reproduce this issue?

  1. Open VS Code 1.71.0 with Pi Pico W connected to USB port
  2. Initialize a pico-go project
  3. Terminal loads but without any REPL

What happens?

Bottom bar shows "Pico W Connected" but on the bottom right I get a popup with an error message saying "Unable to start terminal"

What were you expecting to happen?

Any logs, error output, etc?

(If it’s long, please paste to https://gist.github.com and insert the link here)

Any other comments?

Support info

VS Code 1.71.0
Ubuntu 20.04
With the nRF Terminal extension I can open a serial connection with no problem

Copy this from the Help -> Info -> Copy option in Visual Studio Code:

< Paste Here >

Cannot connect to pico via COM4

What are the steps to reproduce this issue?

  1. Connect pico to pc with a micro usb wire
  2. Launch vscode and install pico-w-go extension
  3. Configure the project folder, then click on the "pico disconnected" button

What happens?

It tries to connect via COM4, but it gives "Opening COM4: Unknown error code 121" message, when i checked Thonny to see if this issue continues; Thonny was able to connect to the board on COM5. I also checked the device manager and saw that COM3 and 4 is used for some sort of bluetooth action (they have nothing to do with pico).

What were you expecting to happen?

I was expecting to connect to the board on COM5

Any logs, error output, etc?

2023-03-05 17:46:30.152 [error] Error: Opening COM4: Unknown error code 121 picowgo.toggleConnect {"value":"paulober.pico-w-go","c":"paulober.pico-w-go"}

Any other comments?

I was trying to do an IoT project with MicroPython and raspberry pi pico, came across to this issue, searched the internet and all extension settings for any solution but couldn't find one.

Support info

Copy this from the Help -> Info/About -> Copy option in Visual Studio Code:

Version: 1.76.0 (user setup)
Commit: 92da9481c0904c6adfe372c12da3b7748d74bdcb
Date: 2023-03-01T10:22:44.506Z
Electron: 19.1.11
Chromium: 102.0.5005.196
Node.js: 16.14.2
V8: 10.2.154.26-electron.0
OS: Windows_NT x64 10.0.19045
Sandboxed: Yes

Port update in settings is not reflected while connecting

What are the steps to reproduce this issue?

  1. Set port to /dev/ttyUSB0 with auto connect disabled
  2. Restart VScode
  3. Update port to /dev/ttyACM0 (pico's port) with auto connect disabled
  4. Try connecting to Pi Pico

ps: Settings are changed in both workspace and user settings

What happens?

Connection attempt is made on /dev/ttyUSB0 rather than updated port and needs a restart to connect successfully

What were you expecting to happen?

Connection attempt is made on /dev/ttyACM0, the updated port without needing a restart to connect successfully

Any logs, error output, etc?

Any other comments?

Support info

Version: 1.76.2
Commit: ee2b180d582a7f601fa6ecfdad8d9fd269ab1884
Date: 2023-03-14T17:57:21.103Z
Electron: 19.1.11
Chromium: 102.0.5005.196
Node.js: 16.14.2
V8: 10.2.154.26-electron.0
OS: Linux x64 6.1.18-200.fc37.x86_64
Sandboxed: No

Running file deletes all other files from the board

What are the steps to reproduce this issue?

  1. Upload project (pico-w-go > Upload project)
  2. Open any .py file
  3. Click Run or right click in project explorer and select pico-w-go > Run current file

What happens?

File runs, but all other files and folders are deleted from the board

What were you expecting to happen?

File runs and the rest of the files and folders stays intact.

Any logs, error output, etc?

(To get extension logs see Terminal > Output > Protcoll (Extensionhost) and copy output concerning picowgo)
(If it’s long, please paste to https://gist.github.com and insert the link here)

pico-w-go-run

Any other comments?

Support info

Copy this from the Help -> Info/About -> Copy option in Visual Studio Code:

< Paste Here >

Typo in Pico-W-Stub/stdlib/socket.pyi

Current file contents are

from .socket import *

which obviously doesn't make sense. Problem is resolved by changing to

from .usocket import *

Will submit a PR with fix, just posting issue for tracking purposes.

Commands/REPL Hangs After Run

What are the steps to reproduce this issue?

  1. Launch VS Code (with Pico W already connected or connecting Pico W afterward).
  2. Run a python file that contains time.sleep delays or while(True) loops using the "Run current file" Pico-W-Go command.

What happens?

After running, the REPL terminal and commands become unresponsive. The "Run" button does not change to "Stop", cannot perform soft or hard resets, or send commands of any kind. The current python program does start and continue to run on the Pico W.

What were you expecting to happen?

I was expecting to be able to interrupt and stop the running program. This functionality works in Thonny.

Any other comments?

  • The program ending on it's own or reloading VS Code makes it responsive again until the next run.
  • A few days ago I don't think I was having this issue, so it could have been introduced with a recent update.
  • I specified the python path in the extension settings: C:\Users\"user"\AppData\Local\Programs\Python\Python311\python.exe.
  • pyserial was installed automatically by Pico-W-Go successfully.

Support info

Copy this from the Help -> Info/About -> Copy option in Visual Studio Code:

Version: 1.77.3 (user setup)
Commit: 704ed70d4fd1c6bd6342c436f1ede30d1cff4710
Date: 2023-04-12T09:16:02.548Z
Electron: 19.1.11
Chromium: 102.0.5005.196
Node.js: 16.14.2
V8: 10.2.154.26-electron.0
OS: Windows_NT x64 10.0.19042
Sandboxed: Yes

It's very possible I've done something wrong, I'm fairly new at this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.