I need some help with some code if possible....
I need to trigger a pin on the GLCD on when solar output reaches a certain level but it needs to wait until the PV output has been high for say 30 seconds, and then stay on and overrun once the PVoutput drops for say 15mins (to allow for clouds etc)
I am stuck with the millis() function any help appreciated, I have spent 2 long evenings and made no progress to the point where I have deleted all my code and am back to square one, this is what i need in arduino speak:-
if solarPV > 3000 then
start a count down from 30 seconds to 0 then set output to true, if it drops below 3000 during this time, reset the 30second countdown. Once it has been higher than 3000 for 30 seconds it needs to run for 15mins minumum,
once output is true then keep track of the run time (in seconds)
once output drops below 3000 start a 15minute countdown before turn off (and reset to 15mins if output pops over 3000 again)
I know its easy enough, I just cant get it working! Cant see the wood for the trees.
Re: help programming Arduino timers, clocks, counters.
Please try something like this (modified 'Blink' example code):
Re: help programming Arduino timers, clocks, counters.
thanks, will give that a whirl later