Connect the LDR to A0
And the laser to D9
Have the laser point at the LDR
Also put the led short leg into the ground pin and the other into the D12 pin
If its not working comment and I will respond within a day or two
EXPANDED TECHNICAL DETAILS
Precision Security Engineering
This laser-based security system provides an invisible, long-range "Tripwire" that triggers an alarm when the beam is interrupted.
- Phototransistor Signal Analysis: The Arduino monitors an LDR or phototransistor placed opposite a laser diode. The firmware uses an "Ambient Light Baseline" calculation to ensure the alarm doesn't trigger accidentally from room lights, only from the specific high-intensity laser pulse.
- Multi-Zone Monitoring: (Advanced version) Manages several tripwires simultaneously. The Arduino can identify which zone was breached and report the specific entry-point on a central serial console or smartphone app.
Alert Responses
- Stealth and Loud Modes: Includes a "Silent Alarm" mode that sends an instant WiFi/GSM notification and a "Loud" mode that triggers a high-volume siren and strobe light.