Advertisement
ossipee

pir more sensors picaxe

Oct 11th, 2015
266
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. main:
  2. readadc 1,b1 'ldr sensor
  3. readadc 2,b2 'pir sensor 1
  4. readadc 3,b3 'pir sensor 2
  5. readadc 4,b4 'pir sensor 3
  6. readadc 5,b5 'pir sensor 4
  7. readadc c.0,b6 'pir sensor 5
  8. readadc c.4,b7 'pir sensor 6
  9. if b7>0 or b2>0 or b3>0 or b4>0 or b5>0 or b6> 0 and b1> 100 then sethigh 'its light out audible alarm only
  10. if b7>0 or b2>0 or b3>0 or b4>0 or b5>0 or b6> 0 and b1< 100 then sethigh2'its dark out lights on audible on
  11. if b7=0 and b2=0 and b3=0 and b4=0 and b5=0 and b6=0 then setlow'no critters about all quiet on chicken front
  12. goto main
  13.  
  14. sethigh:
  15. high c.2 'siren alarm'
  16. goto main
  17.  
  18. sethigh2:
  19. high c.1 'flood lights and alarm siren
  20. high c.2
  21. goto main
  22.  
  23. setlow:
  24. low c.1 'all quiet
  25. low c.2
  26. goto main
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement