EM02 · Sem 5 · Microcontrollers
LED chaser (knight rider)
Aim: Drive eight LEDs in sequence with arrays and loops.
🧪 Live simulation🧊 Real-time 3D bench⚠ Simulated values, not physical measurements
🔬 Virtual lab
Starting the lab…
📘 Theory
Storing pin numbers in an array lets one loop light each LED in turn and then come back: a classic exercise in arrays, loops and timing.
one sweep = 2 × 7 steps × delay
🧰 Apparatus (virtual)
- Dev board
- LEDs on pins 3–10
📝 Procedure
🎤 Viva questions
Why use an array of pins
One loop handles any number of LEDs.
How would you do this without delay()
Compare millis() with the last change time.
🛡️ Safety
Virtual board. On real hardware, check supply voltages and pin current limits, and power motors and servos from a separate supply.