Arduino Nano on a breadboard: a servo sweep
The Nano is an Uno shrunk to 45 × 18 mm, with the same ATmega328P. The Servo library makes 50 Hz pulses on any pin: 544 µs is 0°, 2400 µs is 180°. It borrows timer 1, so analogWrite stops working on pins 9 and 10. Servos can draw 200 mA or more while moving, so on a real build give them their own 5 V.

Open this lesson in the labFree, in your browser, no account needed.
Try it on the bench
- Watch the 5 V rail dip while the servo moves: on USB the Nano’s diode already drops it to about 4.7 V.
- Change the delay(15) to delay(2): the servo cannot keep up and lags behind the commanded angle.
- This Nano has the new bootloader. Select it and set “Bootloader on this board” to Old, then upload: it fails with “not in sync” until you pick ATmega328P (Old Bootloader) in the IDE.
Parts on the bench
In the course
Zen’s Electronics Design Mastery, module “Microcontrollers & Embedded”.