A quick overview of what the program should be doing.
Basically on pin C.2 I have the input voltage between 0-5 that is varied using a variable resistor.
Depending on the voltage that is on pin C.2 there will be a delay which will activate the output C.1.
I'm pretty sure that it is my code that has an issue and not the hardware itself.
Basically on pin C.2 I have the input voltage between 0-5 that is varied using a variable resistor.
Depending on the voltage that is on pin C.2 there will be a delay which will activate the output C.1.
I'm pretty sure that it is my code that has an issue and not the hardware itself.
Code:
Main:
ReadADC c.2 , b0 ; read in pot value
if B0 < 20 then ;
wait 0
elseif b0 < 40 then
low C.1
wait 1
high c.1
elseif b0 < 60 then
low C.1
wait 2
high c.1
elseif b0 < 80 then
low C.1
wait 3
high c.1
elseif b0 < 100 then
low C.1
wait 4
high c.1
elseif b0 < 120 then
low c.1
wait 5
high c.1
elseif b0 < 140 then
low c.1
wait 6
high c.1
elseif b0 < 160 then
low c.1
wait 7
high c.1
elseif b0 < 180 then
low c.1
wait 8
high c.1
elseif b0 < 200 then
low c.1
wait 9
high c.1
elseif b0 < 220 then
low c.1
wait 10
high c.1
elseif b0 < 240 then
low c.1
wait 11
high c.1
elseif b0 < 260 then
low c.1
wait 12
high c.1
endif
goto main