/DIYArduinoDeskLamp

Code for a desk lamp, switched on and off using a Photoresistor and a PIR Motion Sensor.

Primary LanguageC++MIT LicenseMIT

DIY Arduino Desk Lamp

A desk lamp with an automatic switch mode that turns on and off based on current lighting conditions and user's motion.

Features

  • Has three (3) modes: Always ON, Always OFF, and Automatic Mode.
  • Always ON: The light stays ON regardless of sensor data.
  • Always OFF: The light stays OFF regardless of sensor data.
  • Automatic Mode: If there isn't enought light in the room and motion is detected, light turns on. However, if there is enough light in the room, regardless of any motion detected, the light won't turn on.
  • Each motion adds seconds to the time delay before it turns off. There is a max delay time to preserve energy when no motion is detected for a prolonged duration. The light also automatically turns off when environment light source is enough, or it's bright.

Screenshot(s)

Image:

Photo of miniature with PIR Sensor (in the middle).

Image:

Wiring Diagram

Credits Behind This Project

Almar Glen Marcelo

Cedric Tanfelix

Christian Kyle Ching

Corina Mae Matic

Ivan Chedrick Cantillon

Mary Grace Cabotaje