https://github.com/keredson/unotebook
An on-device Juypter Notebook like tool for Micropython.
https://github.com/keredson/unotebook
Last synced: 9 months ago
JSON representation
An on-device Juypter Notebook like tool for Micropython.
- Host: GitHub
- URL: https://github.com/keredson/unotebook
- Owner: keredson
- License: mit
- Created: 2025-10-03T17:54:20.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-10-03T23:19:36.000Z (9 months ago)
- Last Synced: 2025-10-03T23:26:54.937Z (9 months ago)
- Language: JavaScript
- Size: 48.8 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# µNotebook
An Juypter Notebook like tool for Pybricks and other Micropython devices.
## About
This started as a way for my kid to program an ESP32-based robot we built. I've since
added support for [Pybricks](https://pybricks.com/) (since he joined [FLL](https://www.firstlegoleague.org/)).
It supports notebook-style programming in a *mixture* of Python and visual block-style cells.
It connects to Pybrick devices (like the [Spike Prime Hub](https://education.lego.com/en-us/products/lego-technic-large-hub-for-spike-prime-/45601/)
and [Mindstorms Inventor Hub](https://www.lego.com/en-lt/product/large-hub-88016)) via Bluetooth and [Micropython](https://micropython.org/) devices
via [WebREPL](https://docs.micropython.org/en/latest/esp32/quickref.html#webrepl-web-browser-interactive-prompt).
## Why Notebook-Style Programming for Robotics?
Notebook-style programs are ideal for robotics because they blend code, data, and documentation in one place.
They enable:
- Interactive experimentation — run small code cells to move motors, read sensors, or tune parameters without reflashing.
- Fast iteration — adjust control or perception algorithms and instantly see results.
- Integrated visualization — plot trajectories, sensor data, or camera frames inline.
- Reproducibility and sharing — every experiment records its code, output, and notes together.
- Bridging simulation and hardware — the same notebook can command real robots or virtual ones.
This workflow shortens the test-observe-refine loop that defines robotics development.
## Why Mix Python and Block Coding?
Our notebook lets students mix block-based and Python code in the same workspace.
This makes it ideal for learning — beginners can start visually, then see and edit the exact Python code that’s generated.
It bridges the gap between drag-and-drop logic and real programming, helping students gradually build confidence and understanding without switching tools.
A block example:

Generated this code:
```python
from pybricks.hubs import PrimeHub
from pybricks.robotics import DriveBase
from pybricks.pupdevices import Motor
from pybricks.parameters import Port
from pybricks.parameters import Direction
hub = PrimeHub()
bot = DriveBase(
Motor(Port.A, positive_direction=Direction.COUNTERCLOCKWISE),
Motor(Port.B, positive_direction=Direction.CLOCKWISE),
56, 120
)
```
## Examples
Check out some examples [here](https://github.com/keredson/unotebook/tree/main/examples).