Skip to content

Commit

Permalink
Merge pull request #76 from paulober/develop
Browse files Browse the repository at this point in the history
Patch v3.0.5
  • Loading branch information
paulober authored Apr 18, 2023
2 parents 8788550 + a1d547d commit c9c979c
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 19 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,16 @@ All notable changes to the "pico-w-go" extension will be documented in this file
## Known issues
- Run current file does not include modules that are localy imported and in current workspace, unless you upload the python file containing the module via the upload file or project feature first. (since ever)
- Mounting virtual workspace causes existing vREPLs to freeze so they need to be disposed manually for some reason. (maybe cauaused by vscode)
- Mounting virtual workspace causes existing vREPLs to freeze (*sometimes*) so they need to be disposed manually for some reason. (maybe cauaused by vscode)
- Scripts without a print statement sometime causes the extension to freeze

---

## [3.0.5] - 2023-04-18

# Changed
- Updated README.md

## [3.0.4] - 2023-04-18

# Changed
Expand Down
40 changes: 23 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ Pico-W-Go provides code auto-completion and allows you to communicate with your
> __Auto-completion based on Raspberry Pi Pico W MicroPython firmware: [rp2-pico-w-20230407-unstable-v1.19.1-1009-gcfd3b7093.uf2](https://micropython.org/resources/firmware/rp2-pico-w-20230407-unstable-v1.19.1-1009-gcfd3b7093.uf2)__
Works with:
| Platform | Architectures |
|----------|:------------------:|
| Windows | x64, arm64 |
| macOS | x64, arm64 |
| Linux | x64, arm64, armvhf |
| Platform | x64 | arm64 / aarch64 | armv7l |
|----------|:---:|:--------------:|:------:|
| Windows | :white_check_mark: | :white_check_mark: | :x: |
| macOS | :white_check_mark: | :white_check_mark: | :x: |
| Linux | :white_check_mark: | :white_check_mark: | :white_check_mark: |

## Features

- Auto-completion and docs
- Terminal integration for communication with MicroPython REPL on a Pico (w) board
- Running/Transferring files to/from your board
- Pseudo terminal integration for communication with MicroPython REPL on a Pico (w) board
- Running / Transferring files to / from your board
- Built-in virtual-workspace provider for Raspberry Pi Pico (W) boards

![Terminal](images/autocomplete.gif)
Expand All @@ -25,19 +25,19 @@ Works with:
* [MicroPython firmware](https://micropython.org/download) flashed onto the Raspberry Pi Pico (W):
- See [Raspberry Pi docs](https://www.raspberrypi.com/documentation/microcontrollers/micropython.html#drag-and-drop-micropython) for help.

* [Python 3.9 or newer](https://www.python.org/downloads/) installed on your system and in your PATH.
* [Python 3.9 or newer (with pip)](https://www.python.org/downloads/) (user install; Microsoft Store version not supported but may work) installed on your system and in your PATH.
* [`pyserial` pip package](https://pypi.org/project/pyserial/): `pip install pyserial`

Visual Studio Code extensions:
* [ms-python.python](vscode://extension/ms-python.python)
* [visualstudioexptteam.vscodeintellicode](vscode://extension/visualstudioexptteam.vscodeintellicode)
* [ms-python.vscode-pylance](vscode://extension/ms-python.vscode-pylance)
* `ms-python.python` | [\[Install\]](vscode://extension/ms-python.python) [\[Show\]](https://marketplace.visualstudio.com/items?itemName=ms-python.python)
* `visualstudioexptteam.vscodeintellicode` | [\[Install\]](vscode://extension/visualstudioexptteam.vscodeintellicode) [\[Show\]](https://marketplace.visualstudio.com/items?itemName=VisualStudioExptTeam.vscodeintellicode)
* `ms-python.vscode-pylance` | [\[Install\]](vscode://extension/ms-python.vscode-pylance) [\[Show\]](https://marketplace.visualstudio.com/items?itemName=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 three ways how to solve this problem:
1. Run VS Code in sudo (NOT RECOMMENDED)
2. Normaly adding your user to `dialout` group should fix the issue: `sudo usermod -a -G dialout $THEUSER` (logout required)
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 Raspbian OS*). This leads to timeout and access denied errors when Pico-W-Go tries to connect to the Pico. There are three ways how to solve this problem:
1. Run VS Code in sudo (__NOT RECOMMENDED__)
2. Normaly adding your user to `dialout` group should fix the issue: `sudo usermod -a -G dialout $USER` (logout required)
3. Dynamically 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. The script will readout the group owning the device file and then add you to this group. (logout required)
```bash
# download scripts/solvePermissions.sh
Expand All @@ -51,20 +51,26 @@ chmod +x ./solvePermissions.sh

## Getting started

- First of all open a folder and run `Pico-W-Go > 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.
- First of all open a folder and run `> Pico-W-Go > 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](#requirements).

- If you have trouble running `> Pico-W-Go > Configure Project`, try setting following settings in your global VSCode `settings.json`:
```json
"picowgo.pythonPath": "/path/to/your/python/executable/python3"
```

- 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)](https://datasheets.raspberrypi.com/picow/connecting-to-the-internet-with-pico-w.pdf). So, you can use the following script in place of `flash.py`:
```python
from machine import Pin
from time import sleep
from utime import sleep

pin = Pin("LED", Pin.OUT)

print("LED starts flashing...")
while True:
pin.toggle()
sleep(1)
sleep(1) # sleep 1sec
```

---
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "pico-w-go",
"displayName": "Pico-W-Go",
"description": "Autocompletion, remote Workspace and a REPL console for the Raspberry Pi Pico (W).",
"version": "3.0.4",
"version": "3.0.5",
"publisher": "paulober",
"license": "MPL-2.0",
"homepage": "https://github.com/paulober/Pico-W-Go/blob/main/README.md",
Expand All @@ -18,6 +18,7 @@
"color": "#ffffff",
"theme": "light"
},
"markdown": "github",
"engines": {
"vscode": "^1.77.0",
"node": ">=16.14.2"
Expand Down

0 comments on commit c9c979c

Please sign in to comment.