Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void setup()
- {
- pinMode( 8 , OUTPUT);
- Serial.begin(9600);
- pinMode( 9 , OUTPUT);
- }
- void loop()
- {
- Serial.print( analogRead(A0) );
- Serial.println("");
- digitalWrite( 8 , HIGH );
- delay( 50 );
- digitalWrite( 8 , LOW );
- delay( 50 );
- digitalWrite( 9 , HIGH );
- if (( ( analogRead(A0) ) == ( 1023 ) ))
- {
- digitalWrite( 9 , LOW );
- delay( 10000 );
- }
- }
- http://www.instructables.com/id/Anti-theft-Entrance-Guard-Alarm-System-Based-on-Ar/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement