Boards and essentials
Uno R3 compatible board
A widely available 5 V board for learning inputs, outputs, and simple control.
What it does
An ATmega328P runs your sketch repeatedly. Digital pins read or switch logic states; analog inputs measure a voltage. USB connects the board to a computer for programming and serial messages.
Connections and compatibility
These examples use the classic ATmega328P Uno R3: 5 V logic, A0–A5 analog inputs, and PWM on D3, D5, D6, D9, D10, and D11. ESP32 and Uno R4 boards have different capabilities and electrical limits.
Choosing one
Choose a clearly identified R3 compatible board with soldered headers and a documented USB interface. A cheaper compatible board is sufficient; an official board is not required.
Common mistakes
GPIO pins carry signals, not motor power. Never apply 5 V to a 3.3 V-only sensor input. Disconnect USB before changing wiring.
Use it in a tutorial
- Analog and PWM signals — Use a potentiometer to control an indicator, and learn how analog measurements differ from PWM outputs.
- Introduction to Arduino — Upload your first sketch, blink the built-in LED, and use Serial Monitor to see what the board is doing.
- Buttons and switches — Wire a button with an internal pull-up, debounce it, and toggle an indicator once per press.
- Communication between devices — Send commands and readings over USB serial, then choose between UART, I²C, SPI, and networking.
- Blinking an LED — Wire a low-current status indicator and blink it without blocking the rest of your program.
- Passive infrared (PIR) motion sensors — Read an HC-SR501 motion sensor and learn why movement detection is different from occupancy.
- Infrared receiver modules — Decode an old remote with a 38 kHz receiver and distinguish new presses from held-key repeats.
- Servo motors — Move a lightweight pointer with two buttons while powering a micro servo independently of the controller.
- Convert a servo to continuous rotation — Understand a servo conversion, calibrate neutral, and control continuous rotation with a short timed run.
- Stepper motors — Move a 5 V 28BYJ-48 with a ULN2003 driver, starting slowly and accounting for missed steps and backlash.
- Shift registers — Use a 74HC595 to drive eight low-current indicators with three controller pins.
- Transistors — Build a low-side transistor switch, then learn what changes when the load becomes a motor or relay.
- Ultrasonic distance sensors — Measure distance with an HC-SR04, reject missing echoes, and compare raw readings with a small median filter.
- Using an LED matrix module — Show readable status symbols on a MAX7219 matrix instead of adding a full screen.
- Using an analog joystick module — Read a thumb stick, calibrate its resting center, and add a dead zone for stable controls.
- Using rotary encoders — Decode a mechanical knob’s direction and count complete quadrature cycles without mistaking every bounce for a turn.
- Using an RFID module — Read an RC522 tag identifier with correct voltage translation, and understand why a UID is not a secure key.