Arduino Nano · SH1106 OLED · U8g2

Servo programmer

A handheld tool for setting servos by hand, built to test my robot arm

The servo programmer: an Arduino Nano, a small OLED screen and yellow, green and yellow buttons on a breadboard, with servo leads

Overview

I built this to move my robot arm's servo joints by hand while testing the build. A 1.3-inch SH1106 OLED shows each servo's angle and its approximate pulse width in microseconds, and three buttons move them.

What I built

Three buttons

Decrease, set and increase, with debounce and auto-repeat when held.

Set to center

Tap set to center a servo; hold it to copy the bottom servo's angle to the top one.

Angle and pulse

The OLED shows each servo's angle and its approximate pulse width in µs.

The display

A 1.3-inch SH1106 OLED over SPI, drawn with the U8g2 library.

Challenges and what I learned

The build itself was straightforward; the hardest part was programming the OLED: wiring it over SPI and drawing the angles and pulse widths with U8g2.

A longer write-up of this part is on the way.