Welcome, Pteronaut.
Open-source firmware for servo-driven ornithopters β built on ExpressLRS.
π Documentation & Website β EN Β· PT
PteronautOS replaces the traditional fixed-wing flight controller with an adaptive flapping oscillator built directly into the receiver. No intermediate FC required. The radio link directly drives the wings.
- Adaptive Flapping Oscillator β configurable waveform, amplitude, and frequency per channel
- Automatic Gliding β wings lock at neutral below throttle threshold (with hysteresis)
- Zephyrus Gyro Stabilization β MPU6050-based crest rudder correction for roll + yaw stability
- Failsafe β wings return to neutral on link loss, re-arm on reconnect
- Direct PWM Output β drives two wing servos + rudder + auxiliary channels
- Minimal Footprint β non-essential ELRS modules stripped (Telemetry, Baro, VTX, Thermal, Serial1)
The one-command path builds the WebUI, compiles the firmware, and flashes it:
./scripts/flash.sh --lang en # English only ./scripts/flash.sh --lang de,en # German + English ./scripts/flash.sh --lang all # all 11 languages ./scripts/flash.sh # interactive: pick all / some / skip
The flash script bakes the selected WebUI languages into the firmware, then runs pio. To build manually (without flashing):
cd src/html && nvm use 20 && I18N_LOCALES=en npm run build:pteronautos cd ../.. && pio run -d src -e PteronautOS_ESP8285_2400_RX
Requires Node.js 20+. The I18N_LOCALES flag (and --lang on the flash script) selects which languages are baked into the WebUI β a comma-separated list (e.g. en,de) or a single code; omit it to include all 11 languages.
These live on the docs website too β under Tutorials β For developers (kept apart from the user tutorials so flying stays easy):
| Guide | Scope | Website |
|---|---|---|
| DEVELOPING.md | Developer tutorial β toolchain setup, repo layout, build order, target envs, config, and build rules | tutorials/developing |
| FLASH-SCRIPT.md | scripts/flash.sh tutorial β flags, mixers, saved presets, --no-build, and flashing |
tutorials/flash-script |
| Resource | Used | Free |
|---|---|---|
| RAM | 50,856 / 81,920 (62.1%) | 31,064 bytes |
| Flash | 553,272 / 991,216 (55.8%) | 437,944 bytes |
| Guide | Scope |
|---|---|
| HARDWARE.md | Complete wiring guide β PWMP7 v1.1 pin mappings, GY-521 IΒ²C wiring, voltage tables, servo compatibility, flash workflow |
| ELRS PWM7 Reference | Generic ELRS PWM7 board specs and pin reference |
| PteronautOS.md | Main project documentation β architecture, modules, build system, full pin mappings |
Radio Packet β ChannelData[16] β servosUpdate() (βkHz tick)
β
βββββββββββββββββββΌββββββββββββββββββ
βΌ βΌ βΌ
zephyrusUpdate() ornithopterUpdate() servoCalcAllChannels()
(gyroβAHRSβPID) (flapping oscillator) (standard PWM map)
β β
βΌ βΌ
gyroRudderCorrection servoLeftUs/servoRightUs
β β
ββββββ¬βββββββββββββ
βΌ
servoRudderUs (pilot mix + gyro correction)
β
βΌ
PWM Output (GPIOs)
MUSHIN bridge β when
MUSHIN_ENABLED=1and a YOSHIMITSU muscle is linked, the spirit streams wave parameters instead of finished Β΅s; the RP2040 reconstructs phase + waveform locally. See docs/MUSHIN.md.
| File | Lines | Purpose |
|---|---|---|
Ornithopter.h |
57 | Core oscillator β state, timing, flapping/gliding logic |
Ornithopter.cpp |
152 | Engine implementation β waveform generation, channel mixing |
OrnithopterConfig.h |
54 | Compile-time defaults β channel mapping, servo limits, scaling |
OrnithopterWaveform.h |
56 | Waveform library β sin, saw, square, custom shapes |
OrnithopterFilter.h |
35 | Integration bridge β #ifdef ORNITHOPTER_MODE guards |
| File | Lines | Purpose |
|---|---|---|
ZephyrusConfig.h |
54 | Compile-time constants β IΒ²C, MPU6050, AHRS, PID, mixer gains |
Zephyrus.h |
85 | Class declaration β MPU6050 driver, Mahony AHRS, dual PID |
Zephyrus.cpp |
526 | Full implementation β sensor read, calibration, AHRS, PID, correction |
ZephyrusFilter.h |
35 | Bridge shim β copies rudderCorrection β ornithopter.gyroRudderCorrection |
See Zephyrus README for full architecture, API, tuning guide, and troubleshooting.
| Line | Mechanism | Effect |
|---|---|---|
| 10 | #include "Ornithopter/OrnithopterFilter.h" + "Zephyrus/ZephyrusFilter.h" |
Zero overhead without build flags |
| 158 | ornithopterOnLinkDown() + zephyrusOnLinkDown() in servosEnterFailsafe() |
Wings to neutral, zero gyro on link loss |
| 230 | zephyrusUpdate() before ornithopterUpdate() in servosUpdate() |
Gyro correction set before mixer runs |
| 357 | ornithopterOnLinkUp() + zephyrusOnLinkUp() in event() |
Arms ornithopter, resets PID on connection |
All guarded with #ifndef ORNITHOPTER_MODE:
- AnalogVbat, Baro, VTxSPI, MSPVTx, Thermal
- Serial1, SerialUpdate
- Serial protocols (SBUS, CRSF serial via
OPT_CRSF_RCVR_NO_SERIAL)
Kept: RF link, binding, PWM output, LED, WiFi config, Button, RX LUA.
Edit src/lib/Ornithopter/OrnithopterConfig.h to map your CRSF channels and tune flapping parameters:
- Wing servo PWM indices:
ORNITHOPTER_SERVO_LEFT/ORNITHOPTER_SERVO_RIGHT - 10 CRSF channel assignments: throttle, arm, cadence, ferocity, etc.
- Servo Β΅s limits, flapping/gliding thresholds, amplitude scaling
- Steering differential, elevator/aileron scale, cadence rating
For gyro tuning, edit src/lib/Zephyrus/ZephyrusConfig.h β see the Zephyrus README.
Questions, ideas, and build showcases live in GitHub Discussions. For bugs, open an issue.
- π¬ General β open conversation
- π‘ Ideas β feature requests
- π Q&A β community help
- π¦ Show and tell β builds & flights
Built on ExpressLRS. Ornithopter module ported from GralhaAzul v1.29.0. Zephyrus Gyro Module written from scratch for PteronautOS β MPU6050 register-level driver, Mahony AHRS, and dual PID with anti-windup.

