Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/petarsimonovic/sloworm
A tool to interact with MicroPython controllers through the browser
https://github.com/petarsimonovic/sloworm
microcontroller micropython pico raspberryp raspberrypipico webapi
Last synced: 28 days ago
JSON representation
A tool to interact with MicroPython controllers through the browser
- Host: GitHub
- URL: https://github.com/petarsimonovic/sloworm
- Owner: PetarSimonovic
- Created: 2024-09-04T07:57:40.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2024-10-17T15:01:27.000Z (29 days ago)
- Last Synced: 2024-10-18T16:36:20.354Z (28 days ago)
- Topics: microcontroller, micropython, pico, raspberryp, raspberrypipico, webapi
- Language: TypeScript
- Homepage:
- Size: 151 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SloWorm
SloWorm is an in-browser tool that uses the [Web Serial API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Serial_API) to connect and code MicroPython boards.
It's a work in progress and has been developed using a Raspberry Pi Pico. No other types of board have been tested.
The Web Serial API itself is an exprimental feature that isn't compatible with all browsers.
Chrome is recommended.
## Installation
```bash
npm installnpm run start
```SloWorm should be available on http://localhost:5173/
## Connecting a MicroPython board
Click the `connect` button.
When prompted, select `Board in FS mode`.
If the connection is succesful the output pane will state that it's `Connected to MicroPython`.
## Sending code to the board
Type a line of code in the input pane at the top of the screen then press return to send it to the connected MicroPython board.
The board's response will appear in the Output pane below.
Making a board's onboard LED blink is the MicroPython equivalent of "Hello World".
Here's how to do it on a Pico.
```python
from machine import Pin
led = Pin(25, Pin.OUT)led.toggle()
```Subsequent calls to `led.toggle()` should make the light go on and off.
MicroPython uses indentation to delineate blocks of code. SloWorm doesn't yet offer any formatting help here.
## Disconnecting
Click the disconnect button to disconnect from the board.
## Forthcoming work
- Formatting help to indent/unindent MicroPython code (string indentation works at the moment but it's tempremental)
- More tests, refactoring etc
- Flickering glowing effects, possibly to indicate errors
- Accessibility testing/features to adjust colours