Advertisement
ossipee

simple picaxe pir

Oct 11th, 2015
267
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. main:
  2. readadc 1,b1 'pir sensor
  3. readadc 4,b4 'ldr sensor
  4. if b1> 0 and b4> 100 then sethigh 'turn on siren alarm
  5. if b1> 0 and b4< 100 then sethigh2 'turn on flood lights and siren alarm
  6. if b1= 0 then setlow 'nothing is around all quiet
  7. goto main
  8.  
  9. sethigh: 'siren only
  10. high 0
  11. goto main
  12.  
  13. sethigh2: 'siren and lights
  14. high 0
  15. high 2
  16. goto main
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement