explaingit

larocquel/arduino

14C++Audience · generalComplexity · 2/5ActiveSetup · moderate

TLDR

Personal beginner-friendly learning log with Arduino UNO sketches that progress from blinking an LED to building a two-wheel autonomous robot car with obstacle avoidance and line following.

Mindmap

mindmap
  root((Arduino-learning-log))
    Inputs
      Arduino UNO R3 starter kit
      L298N motor driver
      HC-SR04 ultrasonic sensor
      IR sensors
    Outputs
      Phased ino sketches
      Wiring notes per step
      Two-wheel robot car
    Use Cases
      Learn Arduino basics from scratch
      Build a line-following robot
      Build an obstacle-avoidance car
    Tech Stack
      Arduino
      C++
      NewPing

Things people build with this

USE CASE 1

Follow a five-phase path from blinking an LED to a working robot car

USE CASE 2

Wire up an L298N driver and control two DC motors with PWM

USE CASE 3

Measure distance with an HC-SR04 ultrasonic sensor using pulseIn

USE CASE 4

Build a final sketch that combines IR line following and obstacle avoidance

Tech stack

ArduinoC++NewPing

Getting it running

Difficulty · moderate Time to first run · 1h+

Needs the Arduino IDE plus a full starter kit of hardware including UNO R3, L298N driver, motors, and sensors before any sketch runs end to end.

In plain English

This repository is a personal learning log and codebase by Leonardo La Rocque for building a two-wheel-drive autonomous robot car from scratch with an Arduino UNO R3 starter kit. The README frames it as a step-by-step path for absolute beginners, going from blinking the small LED already on the Arduino board all the way to obstacle avoidance and line following. The hardware list covers an Arduino UNO R3, an L298N motor driver module that the README explains is needed because the Arduino alone cannot supply enough power for the motors, two DC gear motors with wheels and a caster, a chassis in acrylic, wood, or metal, an HC-SR04 ultrasonic sensor described as the robot's eyes, one or more IR sensors for line following, a breadboard, red yellow and green LEDs with current-limiting resistors, a push button, jumper wires, a battery holder, and a USB Type-B cable. Software requirements are the Arduino IDE plus the optional NewPing library, and Linux users are reminded to add their account to the dialout group to use the serial port. The code is organized into folders that mirror a five-phase progression. Phase 1, Electronics Basics, walks through the built-in LED blink, an external LED on a breadboard with a resistor, reading a push button with INPUT_PULLUP and the Serial Monitor, building a timed traffic light with three LEDs, and turning it into an interactive crosswalk. Phase 2 introduces the robot's senses by measuring distance with the HC-SR04 ultrasonic sensor using pulseIn and time-to-distance math, and detecting black or white surfaces with an IR sensor. Phase 3 covers motors and the L298N driver: identifying its terminals, spinning one motor forward and in reverse, then controlling speed with analogWrite and PWM duty cycles. Phase 4 is the mechanical assembly, wiring, and writing reusable movement blocks for forward, backward, and turning. Phase 5 brings everything together with two final sketches: obstacle avoidance and line following. Each step folder holds the .ino sketch, short wiring notes, and a description of what was learned, so a reader can follow the journey one phase at a time.

Copy-paste prompts

Prompt 1
Walk me through Phase 1 step by step on a fresh Arduino UNO R3
Prompt 2
Help me wire the L298N motor driver to the UNO and spin one motor forward and reverse
Prompt 3
Show me how to convert the HC-SR04 pulseIn reading into centimeters
Prompt 4
Combine the obstacle-avoidance and line-following sketches into one program
Prompt 5
Explain why I need to add my Linux user to the dialout group before uploading sketches
Open on GitHub → Explain another repo

Generated 2026-05-22 · Model: sonnet-4-6 · Verify against the repo before relying on details.