I an not an accomplished programmer and am struggling to decide the best way to make a retriggerable timer with an 18M2 (because I have them already)
I only have one input that starts a 30 second timer and need to make one output pin high for that period. If there is no further input the outputs goes/stays low. If an input signal arrives whilst the timer is in progress it has to start the 30 seconds timer again so that the output remains high continually and only goes low 30 seconds after the last received input trigger.
Using an M2 I thought the 'Time' variable would be the simplest method but after searching the forum and studying the manuals I still cannot properly grasp how to use it. One possible complication is that the input signal (logic high) might vary in length from 100mS to 1.5 seconds.
None of the scores of example Picaxe timers seem relevant as what i am trying to make is just a monostable really.
Any pointers as to which way I should concentrate would be appreciated.
Ian
I only have one input that starts a 30 second timer and need to make one output pin high for that period. If there is no further input the outputs goes/stays low. If an input signal arrives whilst the timer is in progress it has to start the 30 seconds timer again so that the output remains high continually and only goes low 30 seconds after the last received input trigger.
Using an M2 I thought the 'Time' variable would be the simplest method but after searching the forum and studying the manuals I still cannot properly grasp how to use it. One possible complication is that the input signal (logic high) might vary in length from 100mS to 1.5 seconds.
None of the scores of example Picaxe timers seem relevant as what i am trying to make is just a monostable really.
Any pointers as to which way I should concentrate would be appreciated.
Ian