Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- main:
- readadc 1,b1 'ldr sensor
- readadc 2,b2 'pir sensor 1
- readadc 3,b3 'pir sensor 2
- readadc 4,b4 'pir sensor 3
- readadc 5,b5 'pir sensor 4
- readadc c.0,b6 'pir sensor 5
- readadc c.4,b7 'pir sensor 6
- 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
- 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
- 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
- goto main
- sethigh:
- high c.2 'siren alarm'
- goto main
- sethigh2:
- high c.1 'flood lights and alarm siren
- high c.2
- goto main
- setlow:
- low c.1 'all quiet
- low c.2
- goto main
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement