Beginner Build: Light-Following Robot

Beginner Build: Light-Following Robot

animation
sensors

Beginner Build: Light-Following Robot

Goal: Build Vehicle 2b that chases a flashlight.

Components:

  • ESP32 + L298N motor driver
  • 2× LDR photoresistors (left/right sensors)
  • 2× DC motors + wheels
  • 9V battery

Wiring:

Left LDR  → ADC pin 34 → Right motor (cross-wired)
Right LDR → ADC pin 35 → Left motor (cross-wired)
More light = faster motor (excitatory)

Expected behavior: Robot turns toward flashlight and drives into it

Back to the chapter