How ottodiy/ottodiylib works
OttoDIYLib is an Arduino runtime library for controlling a four-servo biped and its expressive outputs. The main workflow is a sketch initializing Otto with servo pins and calibration, then requesting motion, sound, gestures, or matrix output. The README documents additional example-driven workflows for Bluetooth commands, touch modes, obstacle avoidance, sensor readings, and melodies. Relationships involving unsampled examples are limited to those explicitly described; source excerpts establish the core motion, oscillator, and matrix implementation.
Main entry points: Otto.cpp Otto API · examples Robot demo sketches · Otto_matrix.cpp Matrix driver · Oscillator.cpp Servo oscillator
Components 17
Robot control
- Otto API
src/Otto.cpp - Gaits and motion
src/Otto.cpp - Servo oscillator
src/Oscillator.cpp - Servo hardware
- Servo calibration
src/Otto.cpp
Expression
- Gesture sequences
src/Otto.cpp - Gesture definitions
src/Otto_gestures.h - Songs and tones
src/Otto.cpp - Sound definitions
src/Otto_sounds.h - Mouth patterns
src/Otto_mouths.h - Matrix driver
src/Otto_matrix.cpp - LED matrix
Interfaces and demos
- Serial command parser
src/SerialCommand.cpp - Robot demo sketches
examples - Sensors and controls
Other components
- Arduino sketch
- Bluetooth or serial sender
Connections 19
- Arduino sketch → Otto API: initializes and commands
README.md - Otto API → Gaits and motion: executes motions
src/Otto.cpp - Gaits and motion → Servo oscillator: refreshes servos
src/Otto.cpp - Servo oscillator → Servo hardware: writes positions
src/Oscillator.cpp - Otto API → Servo calibration: loads and saves trims
README.md - Gesture sequences → Gaits and motion: combines movement
README.md - Gesture sequences → Songs and tones: combines sounds
README.md - Gesture sequences → Matrix driver: shows expression
- Gesture sequences → Gesture definitions: uses gesture definitions
src/Otto.cpp - Otto API → Songs and tones: plays songs and tones
README.md - Songs and tones → Sound definitions: uses sound names
- Otto API → Matrix driver: controls display
src/Otto.cpp - Otto API → Mouth patterns: renders mouth patterns
src/Otto.cpp - Matrix driver → LED matrix: drives display
src/Otto_matrix.cpp - Bluetooth or serial sender → Serial command parser: sends commands
- Serial command parser → Arduino sketch: dispatches handlers
src/SerialCommand.cpp - Arduino sketch → Robot demo sketches: uses example workflows
README.md - Robot demo sketches → Otto API: demonstrates robot actions
- Robot demo sketches → Sensors and controls: reads sensor inputs