Medium⏱ time2 hr$ cost18
Voice-Activated Lights
Clap or speak a command and a microphone-driven robot toggles its lights or motors.
Start building ↓
Result first
The build
Step 01
Wire the mic
Connect a sound sensor to an analog input.
Step 02
Set a trigger
Read the sound level and detect a sharp peak (a clap).
Step 03
Count claps
Toggle lights on one clap, motor on two.
Step 04
Test
Clap and watch it respond.
Working Principle
The microphone turns sound into a voltage; the code watches for sudden spikes and counts them to decide which action to fire.
The science behind it
A closer look
It's simple sound-event detection — thresholding and timing claps — a gentle first step toward real voice control.
Take it further
Variables to test
- 1 Tune the threshold for noisy rooms.
- 2 Add a third action for three claps.
More Robotics
Robotics
Obstacle-Avoiding Robot
An Arduino car reads distance with ultrasonic sound and steers itself away from walls.
Hard⏱3 hr$28
Robotics
Line-Following Robot
Infrared sensors keep a small robot glued to a black track as it races a loop.
Hard⏱3 hr$26
Robotics
Bristlebot
A toothbrush head, a coin motor and a battery make a buzzing bug that scurries across the table.
Easy⏱20 min$5