Skip to content

Installation

Ahmed Dabak edited this page Jul 24, 2026 · 2 revisions

Installation

Requirements

Board Arduino Nano or Uno (ATmega328)
Framework Arduino
Dependencies OttoDIYLib, Servo 1.2.0 or newer
Robot Otto DIY biped, or the Humanoid build with arms

Both dependencies are declared by OttoFlow, so your package manager installs them for you.

PlatformIO

Add OttoFlow to the lib_deps of your environment. OttoFlow is not yet in the PlatformIO registry (see the Roadmap), so point at the git repository:

[env:nanoatmega328]
platform = atmelavr
board = nanoatmega328
framework = arduino
lib_deps = https://github.com/ahmeddabak/OttoFlow.git

pio run pulls OttoFlow, OttoDIYLib, and Servo on the next build.

Note Many Nano clones ship the old bootloader. If uploading times out, switch the environment to board = nanoatmega328 with board_upload.speed = 57600, or pick the "ATmega328P (Old Bootloader)" processor in the Arduino IDE.

Vendoring instead of fetching

If you prefer the library inside your repository -- handy while you are changing OttoFlow itself -- drop it in lib/OttoFlow/ and declare only the two dependencies:

[env:nanoatmega328]
platform = atmelavr
board = nanoatmega328
framework = arduino
lib_deps =
    https://github.com/OttoDIY/OttoDIYLib.git
    arduino-libraries/Servo

PlatformIO picks up anything under lib/ automatically.

Arduino IDE

  1. Download the repository as a ZIP from GitHub.
  2. Sketch > Include Library > Add .ZIP Library and select the file.
  3. Install OttoDIYLib the same way, and Servo from Tools > Manage Libraries.
  4. Select Tools > Board > Arduino Nano and the correct port.

Your first sketch

#include <OttoFlow.h>

void setup() {
  OttoFlow::start();
  Mouth::show(Icon::Heart);
}

void loop() {
}

One include is all a sketch ever needs. <OttoFlow.h> brings in every facade, every module, the icon and sound catalogs, and the serial console.

Note The console costs nothing unless you call Console::begin(). The linker strips unused code, so including everything does not inflate your binary.

Uploading and the serial monitor

pio run -t upload
pio device monitor -b 9600

If buzzer.helloOnStart is left at its default, Otto chirps once when start() finishes -- your proof that the firmware booted.

What start() actually does

OttoFlow::start() performs the whole bring-up in one call:

  1. Attaches the four leg and foot servos and the buzzer pin, loading saved trims from EEPROM when loadTrimsFromEeprom is enabled.
  2. Initialises the LED matrix and applies the configured brightness.
  3. Sets the ultrasonic trigger and echo pin modes.
  4. Sets the touch sensor pin mode.
  5. Attaches the arm servos, if this build has arms enabled.
  6. Starts Bluetooth and the MPU-6050, if enabled.
  7. Plays the hello chirp, unless the buzzer is muted.

Call it once, at the top of setup(), before any other OttoFlow call. Next: Configuration.

Clone this wiki locally