Skip to content

Servo Library Compatibility

Position hobby servos with hardware-timed pulses. Uses Timer1 on Uno.

Pinned version
1.3.0
Last matching compile evidence
2026-10-25
Toolchain
avr-gcc-wasm@0.2.0
Primary headers
Servo.h

Dependencies and practical limits

Position hobby servos with hardware-timed pulses. Uses Timer1 on Uno.

Timer-driven pulses; Uno uses Timer1. Combining timer features can change other PWM behavior.

A motor needs an appropriate external supply and common ground. Compilation does not test current or mechanical limits.

No additional catalog dependencies are required.

For a missing header, first compare the include to the example below. For an undeclared identifier, inspect the first diagnostic and selected board rather than changing every library version.

Board compile matrix

These are recorded compile/link results for the current build and exact source hash. UNTESTED means no matching proof, not an assumed pass. Memory values belong to the listed example and exclude runtime stack/heap or dynamic buffers.

Board/profileResultFlash bytesStatic SRAM bytesLast tested
Arduino Uno R3 — ATmega328PPASS2522502026-10-25
Arduino Nano V3 — ATmega328P (new bootloader)PASS2522502026-10-25
Arduino Nano V3 — ATmega328P (old bootloader)PASS2522502026-10-25
ATmega328PB — 16 MHzPASS2708502026-10-25
Arduino Mega 2560 — ATmega2560PASS35781612026-10-25
Arduino Leonardo — ATmega32U4 · native USBPASS58981912026-10-25
Arduino Micro — ATmega32U4 · native USBPASS59001912026-10-25
Arduino Pro Mini — 5 V · 16 MHzPASS2522502026-10-25
Arduino Pro Mini — 3.3 V · 8 MHzPASS2518502026-10-25

Build: e0f6d304cce4ae0a0989a9b1300cbc1a21a595e5e3e7f57ed0ab3468ecf7940b. Library source hash: 69dc662f0bbb78df1deab5fd87073d4f47679892e3d448552364e6957599fd18. Compilation does not certify physical peripherals, timing or USB upload.

Servo sweep example

This is the actual pinned example available in Circuitera. Pin choices and wiring in a general example use Uno unless otherwise stated; review the selected board reference for other targets.

#include <Servo.h>
Servo arm;
void setup() { arm.attach(9); }
void loop() {
  for (int angle = 0; angle <= 180; angle++) { arm.write(angle); delay(15); }
  for (int angle = 180; angle >= 0; angle--) { arm.write(angle); delay(15); }
}
Open Servo sweep in Circuitera →

Projects using Servo

Upstream source and documentation ↗

Pinned source archive (1.3.0) ↗

Read the test methodology →

Keep exploring.