https://github.com/firechip/clickscope
Live oscilloscope for MikroElektronika Click-board accelerometer telemetry (Ubuntu/Yaru, Flutter)
https://github.com/firechip/clickscope
Last synced: about 12 hours ago
JSON representation
Live oscilloscope for MikroElektronika Click-board accelerometer telemetry (Ubuntu/Yaru, Flutter)
- Host: GitHub
- URL: https://github.com/firechip/clickscope
- Owner: firechip
- Created: 2026-07-04T01:07:50.000Z (1 day ago)
- Default Branch: main
- Last Pushed: 2026-07-04T02:46:50.000Z (1 day ago)
- Last Synced: 2026-07-04T04:29:17.171Z (1 day ago)
- Language: Dart
- Size: 159 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Clickscope
**A live oscilloscope for MikroElektronika Click-board accelerometer telemetry.**
Clickscope is an Ubuntu-native (Flutter + [Yaru](https://pub.dev/packages/yaru))
desktop app that connects to a board running the
[clickforge](https://github.com/firechip) firmware, decodes its COBS/CRC
telemetry off USB CDC-ACM, and shows the 3-axis accelerometer stream live —
scrolling X/Y/Z (+ magnitude) plot, a bubble-level tilt view, numeric readouts,
link-quality stats, a device console, and CSV recording.
## What it shows
The firmware (Zephyr, FreeRTOS, RT-Thread, TinyGo, Rust, MicroPython, Ruby,
Forth, …) streams the onboard LIS2DH12 as **COBS-framed binary telemetry**:
```
frame = COBS(payload) + 0x00 (≤ 10 bytes)
payload = [X int16 LE][Y int16 LE][Z int16 LE][CRC16-CCITT LE] (8 bytes)
```
X/Y/Z are already in **milli-g** (the firmware sends `raw16 >> 4`), and each
frame is CRC-16/CCITT-FALSE checked. Clickscope decodes with the published
[`cobs_codec`](https://pub.dev/packages/cobs_codec) package + a matching CRC,
so a corrupted frame is dropped, not plotted.
## Features
- **Auto-discovery** of the board over USB, labelled by firmware (VID:PID → RTOS).
- **Real-time chart** (fl_chart, animation-free) — X/Y/Z + derived magnitude,
per-axis toggles, 10 / 20 / 60 s windows.
- **Tilt indicator** — a bubble-level driven by the gravity vector.
- **Live stats** — streaming rate (Hz), `WHO_AM_I` health, and a rolling
CRC-error rate bar.
- **Console** — the device's ASCII banner and any text lines.
- **Record to CSV** — one click writes `~/clickscope-.csv`.
- **Yaru look & feel** — light/dark/system, Ubuntu accent, CSD title bar.
> **Safety:** Clickscope always opens at **115200 baud**. It will never open at
> 1200 baud — on these boards that is the "touch" that reboots into the UF2
> bootloader.
## Run from source
```bash
flutter pub get
flutter run -d linux # or: flutter build linux --release
```
Requires the Flutter Linux desktop toolchain and `libusb-1.0`. Reading a serial
device needs permission — add yourself to the `dialout` group once:
```bash
sudo usermod -aG dialout $USER # then log out / back in
```
## Install on Ubuntu
**Snap** (see `snap/snapcraft.yaml`):
```bash
snapcraft # builds clickscope_*.snap (uses LXD)
sudo snap install --dangerous clickscope_*.snap
sudo snap connect clickscope:raw-usb # grant raw USB (libusb) access
```
Clickscope talks to the board over **libusb** (it opens the CDC device directly
and detaches the kernel driver), so the interface that matters is `raw-usb`,
not `serial-port`.
**Portable tarball** (no packaging tools):
```bash
flutter build linux --release
tar czf clickscope-linux-x64.tar.gz -C build/linux/x64/release/bundle .
# unpack anywhere and run ./clickscope
```
## Layout
```
lib/
main.dart entry, Yaru theme, master-detail shell
src/telemetry.dart Sample + COBS (cobs_codec) / CRC decode + firmware-id map
src/providers.dart Riverpod controller: serial IO, framing, ring buffer, CSV
src/widgets.dart ScopeChart, TiltIndicator, readouts
src/pages.dart Dashboard, Console, Settings
test/telemetry_test.dart decode / CRC / label unit tests
```
## License
MIT © Firechip / Alexander Salas Bastidas