Clap On Lamp

Pages
Contributors: ShawnHymel
Favorited Favorite 4

Resources and Going Further

The example code and circuit diagram for the Clap On Lamp project can be found on GitHub.

Challenges

  1. Right now, the program looks for any two sharp, successive noises. This could mean tapping the table near the sensor, sneezing or even just talking. See if you can modify the code to be more restrictive about what’s considered a “clap.” Can you have the servo activate only on clap sounds?
  2. Replace the sound detector sensor with another sensor, like a photocell. Have the lamp activate whenever another type of threshold is reached, such as getting too dark in a room.
  3. Write a computer program that looks for the local sunrise and sunset data on the internet and sends a command to the Arduino (e.g., over Serial) to turn the light on at sunset and off at sunrise.

Need some inspiration for your next project? Check out some of these related tutorials:

Mario the Magician's Magical Lapel Flower

A guest tutorial from the astonishingly talented Mario the Magician showing how to put together your own servo-controlled lapel flower.

Spectacle Example: Super Mario Bros. Diorama

A study in building an animated diorama (with sound!) using Spectacle electronics.