Skip to content

Arduino โ€” Microcontroller Programming Guide

Last reviewed: 2026-05-29

Arduino is an open-source electronics platform based on easy-to-use hardware and software. Arduino boards can read inputs (light on a sensor, a finger on a button) and turn them into outputs (activating a motor, turning on an LED).


Overview

The Arduino ecosystem consists of: - Hardware boards โ€” Uno, Nano, Mega, Due, Leonardo, etc. - Arduino IDE โ€” cross-platform development environment - Arduino language (C/C++ with Arduino wrapper) โ€” simplified syntax - Bootloader โ€” allows programming via USB without external programmer

Arduino is the de facto entry point for embedded electronics, used by hobbyists, students, and professionals alike.


Training Content

Crash Course Materials

  • CrashCourseArduinoPartsList_01.pdf โ€” Parts/components list for the introductory Arduino crash course (components, sensors, actuators).
  • CrashCourseArduinoMasterOutline_04.pdf โ€” Structured outline covering Arduino fundamentals, programming constructs, project progression, and assessment.

Study Guides

  • StudentStudyGuide_V012.pdf โ€” Comprehensive PDF study guide for Arduino programming and electronics fundamentals.

Special Topics

  • ESP32-C3_Wireless_Adventure.pdf (34.2 MB) โ€” Guide for working with the ESP32-C3, a RISC-V-based MCU with Wi-Fi/BLE from Espressif.
  • Design_Game_Console_013.pdf (128.8 MB) โ€” Large reference for designing a game console using Arduino-class hardware.
  • colorcode-en.png โ€” Resistor color code chart (standard 4/5/6-band decoding reference).

Key Arduino Concepts

Concept Description
Digital I/O Read/write HIGH/LOW (3.3V or 5V) on pins using digitalRead() / digitalWrite()
Analog I/O analogRead() reads 0โ€“1023 (10-bit ADC); analogWrite() outputs PWM (0โ€“255)
Serial Serial.print() / Serial.println() for debugging over USB
Libraries Pre-written code for sensors, displays, motors โ€” #include <Library.h>
Interrupts attachInterrupt() for responding to pin changes instantly
IยฒC / SPI Communicate with multiple peripherals over 2-wire (IยฒC) or 4-wire (SPI)

Arduino Program Structure

void setup() {
  // Runs once at power-on
  pinMode(LED_BUILTIN, OUTPUT);
  Serial.begin(9600);
}

void loop() {
  // Runs repeatedly
  digitalWrite(LED_BUILTIN, HIGH);
  delay(1000);
  digitalWrite(LED_BUILTIN, LOW);
  delay(1000);
}

Common Arduino Boards

Board MCU Flash SRAM Operating Voltage
Uno R3 ATmega328P 32 KB 2 KB 5V
Nano ATmega328P 32 KB 2 KB 5V
Mega 2560 ATmega2560 256 KB 8 KB 5V
Due SAM3X8E (ARM) 512 KB 96 KB 3.3V
ESP32 (3rd-party) Xtensa LX6 4 MB 520 KB 3.3V

Project Progression

  1. Blink โ€” Hello World of hardware (LED on/off)
  2. Button input โ€” Digital read with pull-up resistor
  3. Potentiometer โ€” Analog input โ†’ serial monitor
  4. Servo motor โ€” PWM control
  5. Ultrasonic sensor โ€” Distance measurement
  6. IยฒC LCD โ€” Display text output
  7. Temperature/humidity (DHT11) โ€” Sensor reading
  8. Wireless (ESP8266/ESP32) โ€” IoT sensor to web

Resources