reuben38121
New Member
Hi guys
will this program work? I cannot be bothered to use all the extra programing stuff for analouge sensors(in my case an LDR), unless I have to. Pin 1 in this case is the LDR. Here is the program:
let b1=1
main:
high 2
pause 750
high4
pause 250
low 2
low 4
high 0
pause 250
low 0
read 1,b1
if pin1=1 then goto sub
if pin1=0 then goto main
sub:
high 0
pause 250
low 0
read 1,b1
if pin1=1 then goto sub
if pin1=0 then goto main
I want it to work so that if the LDR is on, pin 0 is high. will this happen. what does b1=1 mean? Does it mean that when readadc(read 1,b1) reads the pin it translates it into 1, or high?
Please reply!
Â
will this program work? I cannot be bothered to use all the extra programing stuff for analouge sensors(in my case an LDR), unless I have to. Pin 1 in this case is the LDR. Here is the program:
let b1=1
main:
high 2
pause 750
high4
pause 250
low 2
low 4
high 0
pause 250
low 0
read 1,b1
if pin1=1 then goto sub
if pin1=0 then goto main
sub:
high 0
pause 250
low 0
read 1,b1
if pin1=1 then goto sub
if pin1=0 then goto main
I want it to work so that if the LDR is on, pin 0 is high. will this happen. what does b1=1 mean? Does it mean that when readadc(read 1,b1) reads the pin it translates it into 1, or high?
Please reply!
Â