Advertisement
ossipee

smarter pir picaxe westaus

Oct 11th, 2015
261
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. LET bit0 = pinB.1 ; bit0 is a part of byte variable b0
  2. LET bit1 = pinB.2
  3. LET bit2 = pinB.3
  4. LET bit3 = pinB.4
  5. LET bit4 = pinB.5
  6. LET bit5 = pinC.0 ; bit5 is a part of byte variable b0
  7. SYMBOL Ldr = pinC.4
  8.  
  9.  
  10.  
  11. main:
  12. if b0>0 then alarm
  13. if b0>0 and ldr>100 then alarmlight
  14. goto main
  15.  
  16. alarm:
  17. high C.2
  18. goto main
  19.  
  20. alarmlight:
  21. high C.1
  22. high C.2
  23. goto main
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement