A progressive, hands-on Arduino Uno course covering serial commands, LED patterns, PWM motor control, state machines, and emergency-stop behavior. Each lesson includes a compile-checked sketch, wiring contract, test procedure, and extension ideas.
Caution
Never connect a DC motor directly to an Arduino pin. Motor lessons require a suitable transistor or H-bridge driver, flyback protection, an external motor supply, and a shared ground. Read Hardware safety before Exercises C–F.
| Lesson | Project | Main concepts | Hardware |
|---|---|---|---|
| A | Arrow controller | serial input, functions, digital output | 4 LEDs |
| B | Pattern selector | arrays, bit masks, non-blocking timing | 4 LEDs |
| C | Smart fan | PWM, command mapping, safe motor stop | 3 LEDs, driver, motor |
| D | Wheel simulation | H-bridge direction, state machines | 4 LEDs, dual driver, 2 motors |
| E | Synchronized scanner | numeric parsing, map(), animation |
4 LEDs, driver, motor |
| F | Integrated vehicle | analog input, emergency override, telemetry | full circuit |
There is also a small Bluetooth LED warm-up for testing a serial module before starting the main exercises.
- Read Getting started.
- Build Exercise A with the board disconnected from power.
- Upload the sketch and test it in Serial Monitor before adding Bluetooth.
- Complete the lesson's verification checklist.
- Commit your observations and improvements in your own fork.
All sketches use 9600 baud and accept the same characters from USB Serial or a
TTL serial Bluetooth module. On an Uno, the hardware serial pins are shared with
USB; disconnect the module from pins 0/1 while uploading. See
Serial control.
exercises/ Six progressively more involved Arduino sketches
extras/ Small setup and diagnostic sketches
docs/lessons/ Objectives, wiring tables, tests, and challenges
docs/ Setup, safety, serial, and troubleshooting guides
.github/ Contribution templates and automated compile checks
The examples target the Arduino Uno and the Arduino AVR Boards core. CI compiles every sketch with the official Arduino toolchain. Other boards may use different PWM pins, voltage levels, serial ports, or ADC ranges; porting notes are welcome only when verified on hardware.
If you use this software in research or teaching, please cite the Zenodo archive / this repository:
devkyato. (2026). Arduino Programs Guide: safety-first compile-checked Arduino Uno course (Version 1.0.1).
See CITATION.cff for machine-readable metadata.
- Introductory Arduino Uno coursework.
- Safety-first PWM motor-control lessons.
- Compile-checked embedded systems laboratories.
- Independent practice with serial, state machines, and digital outputs.
Student contributions are encouraged. Good changes include clearer diagrams, hardware results, non-blocking improvements, and new tests that preserve each lesson's learning objective. Read CONTRIBUTING.md before opening a pull request.