Hi All
I am only new to this and I have purchased a art controller, I am happy with all the current functions but I am wanting to know if anyone can help me in programing the controller to have a 3 second delay before the timer circuit operates the relay.
Comments
if (PINB & 1) // Make sure that cancel pin is HIGH (not active):
{
resetTimer();
StopTime = calculateStopTime();
TurnCoilOn();
Triggered = 1;
CoilOn = 1;
}
What you will want to do is to add the three-second delay at this point, maybe like so:
if (PINB & 1) // Make sure that cancel pin is HIGH (not active):
{
resetTimer();
StopTime = 3;
while ( seconds() < StopTime)
{}
resetTimer();
StopTime = calculateStopTime();
TurnCoilOn();
Triggered = 1;
CoilOn = 1;
}
(Keep in mind that this is untested code, but it might point you in the right direction.)