Skip to content
Ahmed Dabak edited this page Jul 25, 2026 · 7 revisions

OttoFlow Documentation

OttoFlow is a rapid-development framework for Otto DIY robots. It sits on top of OttoDIYLib and gives you an expressive, unit-explicit API: you describe what the robot should do, not which pin holds which wire.

#include <OttoFlow.h>

void setup() {
  OttoFlow::start();                 // classic Otto kit, zero configuration
  Mouth::show(Icon::Heart);
}

void loop() {
  if (Eyes::closerThanCm(15)) {
    Mouth::show(Icon::Surprised);
    Legs::walkBackward(2);
  } else {
    Mouth::show(Icon::Happy);
    Legs::walkForward(1);
  }
}

That is a complete obstacle-avoiding robot. No pin maps, no library wiring, no magic numbers. See Examples for fuller, ready-to-flash sketches.

Why OttoFlow

Task Raw OttoDIYLib OttoFlow
First sketch pin defines and init boilerplate OttoFlow::start();
Show a heart putMouth(13) Mouth::show(Icon::Heart)
Read distance write your own pulseIn code Eyes::distanceCm(), median filtered
Walk forward walk(2, 1000, 1) -- what is the 1? Legs::walkForward(2)
Test hardware safely comment out code, reflash Motion::disable() plus the serial console
Go lower level -- full module layer and OttoFlow::driver()

Every name states its meaning and its unit: distanceCm(), not dist(). walkForward(2), not walk(2, 1000, 1).

Three layers, no locked doors

Facades   Mouth::show(Icon::Heart)                 expressive, beginner friendly
Modules   Matrix::drawPixel(3, 4, true)            hardware-truth names, full control
Driver    OttoFlow::driver().oscillateServos(...)  raw OttoDIYLib, official escape hatch

Start at the top layer. Drop one level whenever you need more control. Nothing is hidden from you -- see Architecture.

Getting started

  1. Installation -- add OttoFlow to a PlatformIO or Arduino IDE project.
  2. Configuration -- presets, pins, and per-module settings.
  3. Bench Testing -- the safe way to bring hardware up one part at a time.

Documentation

Prologue

  • Architecture -- the three layers and the naming rules behind every API.
  • Roadmap -- what is planned next.

Getting Started

The Basics

  • Mouth -- the 8x8 LED matrix: icons, digits, scrolling text.
  • Eyes -- the ultrasonic distance sensor.
  • Voice -- sounds, tones, and melodies.
  • Movement -- walking, turning, dance moves, gestures, poses.
  • Arms -- the optional humanoid arm servos.
  • Sensors -- touch, microphone, light, and the motion sensor.

Digging Deeper

Reference

Hardware scope

Arduino Nano (ATmega328) with the Otto biped or Humanoid build: four leg and foot servos, an HC-SR04 distance sensor, a MAX7219 8x8 matrix, and a buzzer. Optional and config-enabled: two arm servos, a touch sensor, a microphone, a photoresistor, a Bluetooth serial module, and an MPU-6050 motion sensor. ESP32 support is on the Roadmap.

License

GPL-3.0, inherited from OttoDIYLib, which OttoFlow wraps as its driver layer. Support Otto DIY by buying kits at ottodiy.com.

Clone this wiki locally