Cuttlefish Documentation
Cuttlefish turns TypeScript into the firmware that runs on Arduino, ESP32, and other small boards — and checks your code for common mistakes along the way.
Quick Start
- Getting Started — Create your first project
- GPIO & Digital I/O — Blink an LED
- Communication Buses — I2C, SPI, UART
HAL — Hardware Abstraction Layer
- GPIO & Digital I/O — Pin modes, read/write, toggle, debounce
- Analog & PWM — ADC reads, PWM output, voltage conversion
- Communication Buses — UART, I2C, SPI
- Hardware Events — Interrupts, async edge detection
- Signal Utilities — Tone, pulse, shift registers, RNG
Resource Ownership
- Ownership — Single ownership with move semantics
- Sharing — Immutable borrowing
- Mutability — Mutable borrowing
Transpiler & Language Engine
- Type Mapping — How TypeScript maps to C++
- Zero-Cost Abstractions — What compiles away
- Conflict Detection — Pin and peripheral validation
Hardware Simulation
- Software-Defined Hardware — Run firmware in Node.js
- Peripheral Mocking — Mock I2C/SPI devices
Testing & Diagnostics
- Hardware-in-the-Loop (HIL) — Test on real hardware over serial
- Source-Mapped Diagnostics — Map C++ errors to TypeScript
Ecosystem
- Project Scaffolding — Create new projects
- Board Definitions — Supported boards and custom definitions
- Contracts — Use typeCAD contracts for custom hardware
- CLI Reference — Full command-line reference
On This Page