AR-158IntermediatePremium
Santa Trap: What Time Did He Come? (Arduino + PIR + DS1307 + LCD)
The trap arms itself when the light goes off. If the PIR sees motion, the time is read from the DS1307 and saved, and the servo camera swings left and right; all night the I2C LCD gives nothing away. When the light returns in the morning, the screen shows the time of the first visit and how many visits there were. Night/day sensing with an LDR and hysteresis, PIR rising edge detection and non-blocking servo motion with millis() are in the code.
0.0(0)

Who came to the tree on Christmas Eve, and at what time? This trap quietly goes on watch as soon as the lights go out. When someone comes close it notes the time and swings its little camera left and right, but its screen gives nothing away. Switch the light on in the morning and the answer is waiting: the time of the visit and how many times the visitor came by. Put it next to the cookie plate, by the door or on your desk. Thanks to the clock module's battery the time stays right even after a power cut.
Source Code
Premium Content
The source code, block version and FAQ of this project are open to Premium members.
- All Project Code
- Block version
- Frequently Asked Questions
