Re: Remote pump control ideas.
did you check that paperwork? it may have said when the battery was installed.
did you check that paperwork? it may have said when the battery was installed.

Having a look through my code and wanting to learn to do it better instead of just "good enough to work", I started looking at parts which seem overly-complicated for doing just a simple thing and looked into ways of doing them properly. Some of them I was able to do, but others not so much and I need help 
if ((bitRead(PIND, 5)== 1))
{commandTime = millis();
if (millis()-commandTime >= waitTime)
{run = true;}
}
if ((bitRead(PIND, 5)== 1))
{if (commandStarted == false)
{CommandStarted = true;
commandTime = millis();}
if (millis()-commandTime >= debounceTime)
{run = true;}
}
else {stopCommandStarted = false;
}


extern state;
Drive_LED() {
state = OFF;
while (FOREVER) {
switch (state) {
case OFF:
LED = OFF; break;
case ON:
LED = ON; break;
case BLINK:
LED = ON;
sleep(1000); // ON time, in milliseconds
LED = OFF;
sleep(500); // OFF time, in miliseconds
break;
default:
break;
}
}
}
Comment