Documentation
Software Architecture
Calvin's software is split across three purpose-built systems that communicate in a chain: Explorator ↔ Cogitator ↔ Instinctus.
System Data Flow
Human workstation · Telemetry display · Audio & video feeds · Manual controls · PID tuning
Vision service (OAK-D Pro W) · LLM processing (planned) · Telemetry relay · WebSocket gateway
Sensor reads · Serial bridge · PID balance loop · ODrive CAN commands
01 Instinctus
github.com/fungus-wine/calvin_instinctus
Single-Core Architecture
The Teensy 4.1's ARM Cortex-M7 runs at 600 MHz and handles all Instinctus tasks on a single core — sensor reads, serial comms, the PID balance loop, and CAN bus motor commands.
- Reads ICM-20948 IMU via SPI
- Reads VL53L4CX ToF sensors on a I2C bus
- Receives commands from Cogitator over serial
- Runs PID controller (1 kHz target loop rate)
- Sends velocity setpoints to ODrive S1 over CAN
- Forwards telemetry back to Cogitator
Key Details
| Board | Teensy 4.1 |
| Core | ARM Cortex-M7 · 600 MHz |
| Framework | Arduino / Teensyduino |
| CAN | FlexCAN · 250 kbps |
| Loop rate | 1 kHz target |
03 Cogitator
github.com/fungus-wine/calvin_cogitator
Planned Python Services
Cogitator is architected as a set of independent Python services coordinated by a ZeroMQ message bus and broker.
-
serial_serviceSerial link to Instinctus — reads telemetry, writes commands
-
vision_serviceOAK-D Pro W depth perception, object detection via DepthAI
-
video_serviceStreaming video from OAK-D Pro W
-
hearing_serviceAudio location and processing with ReSpeaker 3.0
-
audio_serviceAudio streaming from ReSpeaker 3.0
-
gateway_serviceWebSocket server — exposes telemetry and commands to Explorator
Runtime Environment
| Platform | Jetson Orin Nano · JetPack 6.2 |
| Language | Python 3 |
| Vision SDK | DepthAI / depthai-python |
04 Explorator
github.com/fungus-wine/calvin_explorator
Electron + Vue 3
Explorator is a cross-platform desktop application built with Electron and Vue 3. It connects to Cogitator's WebSocket API over LAN to provide live telemetry and manual control.
- Real-time telemetry dashboard
- Live camera and audio feeds from Cogitator
- Manual text commands
- PID tuning interface
- Hardware Diagnostics view
- Data Logger
Tech Stack
| Shell | Electron (Node.js) |
| UI Framework | Vue 3 + Vite |
| Styling | Tailwind CSS |
| Networking | WebSocket client |
05 Tooling
Calvin's firmware development relies on two purpose-built tools that replace the standard
Arduino IDE workflow with a simple, scriptable CLI wrapper paired with a graphical companion app.
Servitor depends on grot — it shells out to grot build
and grot load under the hood.
grot
Ruby gem
A friendly CLI wrapper around arduino-cli and teensy_loader_cli.
Reads a per-project .grotconfig TOML file for board
FQBN, port, and sketch path, then exposes memorable sub-commands for the most common
development loops. For example:
-
grot buildCompile the sketch via arduino-cli with config-driven settings
-
grot loadUpload the compiled binary to the connected board
Servitor
Electron / Vue 3A cross-platform desktop app that consolidates the Arduino development loop into a single window — project dashboard, serial monitor, and live data plotter — with one-click build and upload backed by grot.
- Project dashboard — per-project build/load buttons with streaming output
- Auto port detection — scans ports and updates
.grotconfigautomatically - Serial monitor — real-time text view with send capability
- Serial plotter — live charts from
key:valuedata streamed off the board - 9 OKLCH themes, persistent light/dark mode preference
All Repositories
Teensy 4.1 real-time balance firmware
Jetson Orin Nano AI / vision / serial bridge services
Cross-platform desktop monitoring and control app
Processor for Autodesk Fusion CAM files and the Makera Carvera
arduino-cli wrapper — build, upload, and port management via CLI
Desktop app — project dashboard, serial monitor, and live data plotter