Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- main:
- readadc 1,b1 'pir sensor
- readadc 4,b4 'ldr sensor
- if b1> 0 and b4> 100 then sethigh 'turn on siren alarm
- if b1> 0 and b4< 100 then sethigh2 'turn on flood lights and siren alarm
- if b1= 0 then setlow 'nothing is around all quiet
- goto main
- sethigh: 'siren only
- high 0
- goto main
- sethigh2: 'siren and lights
- high 0
- high 2
- goto main
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement