This is a little security alarm that lights a green strobe light for a duration of a few seconds when it detects motion. It uses an arduino mega and a Quest PIR motion sensor.. link to strobe lights
http://www.allelectronics.com/index.php?page=search&search_query=strobe&x=0&y=0
Link to PIR motion sensor
http://www.allelectronics.com/make-a-store/item/IRD-12/PIR-DETECTOR/-/1.html
GEER SORRY PIR SENSOR WAS 11 bucks not 9
code
int ledPin = 13;
int inPin = 32;
int val = 0;
void setup() {
pinMode(ledPin, OUTPUT);
pinMode(inPin, INPUT);
}
void loop() {
val = digitalRead(inPin);
if (val ==LOW) {
digitalWrite(ledPin, LOW);
} else {
digitalWrite(ledPin, HIGH);
delay(9000);
}
}
Pin13 (LEDPIN) goes to your relay and turns on the 12 volt line to the strobe.
InPin 32 can be changes to what ever digital in pin your arduino has. and is the input from the PIR motion sensor from ground.
I plan to add email notifications eventually. Or lol everyone does this but a twitter notification maybe?
any ideas? tlavite@gmail.com
Duration : 0:2:18
Leave a Reply
You must be logged in to post a comment.