Hi rfetech, glad you got it working as you wanted!
If I may suggest you an improvement to increase the stability of your delay, just take more ADC reading instead of one. In the example given I take 10 reading and than multiply for 6 instead of 60, this will reduce by a factor of ten any difference in the ADC reading.
Cheers
Al.
Code:
A0 Var Byte
delayloop:
Delay = 0
For A0 = 1 to 10
ADCIN 2, adval ' Read A/D channel 2 into adval variable.
Delay = Delay + Adval
next A0
delay = delay * 6 ' Creates values for PAUSE command that
PAUSE delay ' allow delays from approx. 0 to 61 seconds.
RETURN
All progress began with an idea
Bookmarks