Shop OBEX P1 Docs P2 Docs Learn Events
Alarm System Contest — Parallax Forums

Alarm System Contest

Gary&LorenGary&Loren Posts: 8
edited 2015-07-22 13:30 in BASIC Stamp
Respond with the program of the most creative security system you can make.[img]file:///C:/Users/Loren/Pictures/IMG_0665.JPG[/img]

' {$STAMP BS2}' {$PBASIC 2.5}CmConstant CON 2260cmDistance VAR Wordtime VAR WordDEBUG "   You Have 10 seconds  " PAUSE 1000 DEBUG CLS  DEBUG "   You Have 9  seconds  "  PAUSE 1000  DEBUG CLS  DEBUG "   You Have 8  seconds  "  PAUSE 1000  DEBUG CLS  DEBUG "   You Have 7  seconds  "  PAUSE 1000  DEBUG CLS  DEBUG "   You Have 6  seconds  "  PAUSE 1000  DEBUG CLS  DEBUG "   You Have 5  seconds  "  PAUSE 1000  DEBUG CLS  DEBUG "   You Have 4  seconds  "  PAUSE 1000  DEBUG CLS  DEBUG "   You Have 3  seconds  "  PAUSE 1000  DEBUG CLS  DEBUG "   You Have 2  seconds  "  PAUSE 1000  DEBUG CLS  DEBUG "   You Have 1  second  "  PAUSE 1000  DEBUG CLS
DO
 PULSOUT 15, 5 PULSIN 15, 1, time DEBUG CLS DEBUG "   ARMED!   "  PAUSE 1000  DEBUG CLS cmDistance = CmConstant ** time

IF  cmDistance < 100 THENDEBUG CLS DEBUG "   You Have 10 seconds to reset system " PAUSE 1000 DEBUG CLS  DEBUG "   You Have 9  seconds reset system  "  PAUSE 1000  DEBUG CLS  DEBUG "   You Have 8  seconds reset system  "  PAUSE 1000  DEBUG CLS  DEBUG "   You Have 7  seconds reset system  "  PAUSE 1000  DEBUG CLS  DEBUG "   You Have 6  seconds reset system  "  PAUSE 1000  DEBUG CLS  DEBUG "   You Have 5  seconds reset system  "  PAUSE 1000  DEBUG CLS  DEBUG "   You Have 4  seconds reset system  "  PAUSE 1000  DEBUG CLS  DEBUG "   You Have 3  seconds reset system  "  PAUSE 1000  DEBUG CLS  DEBUG "   You Have 2  seconds reset system  "  PAUSE 1000  DEBUG CLS  DEBUG "   You Have 1  second  reset system  "  PAUSE 1000  DEBUG CLS  DEBUG "ALARM TRIGGERED!           Press RESET to unarm" DO FREQOUT 0, 25, 3000 FREQOUT 0, 25, 4000 LOOP ENDIF LOOP

Comments

Sign In or Register to comment.