I am building a fan controller and need to use pin 7. When I do, after removing the rs232 connector after programming, I get a a block of digital "1" (seen on my scope) which triggers the relay it operates. How do I "silence" pin 7 when in a "0" condition"
See code below.
thanks!
See code below.
Code:
'#08m '4-1-2012
'out 0 fan
'out 2 camera
'b1 is therm
'b2 is pot
high 2
x:
debug b1
readadc 4,b1
readadc 1,b2
pause 100
if b1>b2 then gosub fanon
if bit2=1 then goto x
if b1<b2 then gosub fanoff
pause 500
goto x
fanon:
if bit1=1 then re
bit1=1
high 0
return
re:
return
fanoff:
low 0:bit1=0
bit2=1
return