This motion detection lamp basically switches on and off when there is motion. The PIR sensor acts as a switch. Initially the idea was to make a mood lamp activated by light sensor. But with a few circumstances, the idea gradually changed. First and foremost, I assembled the wiring.
Next, I wrote up the coding. The coding was not as easy as I thought, since I am still new to this. I had a few difficulties in writing it to make the LEDs turn on and off only when there is motion. The normal coding for motion allows it to only detect motion and automatically the LEDs will turn off when it does.
After much trial and error, the write up is done, so I uploaded the code onto the Arduino Uno. Hence the assembly of the lamp begins. Even though the coding is done, there is a slight imperfection such that after the motion is detected to turn on the lamp, I need to wait for approximately 10 seconds after all motion has stopped to do another motion to turn off the lamp.
A touch sensor was supposed to be a part of the lamp. But I had difficulty combining together both the codes for the PIR sensor and the touch sensor. They work separately, but when they are merged together it doesn't work as I planned. The touch sensor was meant to adjust the brightness of the lamp.
Comments
Please log in or sign up to comment.