}So basically, this pauses the display for 15 secs and then returns to the digits at 00:15:00.This works but is not what I want.. what I would like is to pause the time on the digits like above and do nothing untill the same button is pressed again then we can add the pause time to the display as if it had been counting in the background.

I have been trying to look at the Do.. While.. or the HIGH/LOW but to be honest I don't know what I am looking for.Any tips or help would be greatly appreciated.

Oh no no no, not delay.Capture the time when the button is pressed, set a flag. Prior to shifting out the data see if the flag is cleared, and don't shift the data until time has passed and the flag is cleared.

int time_update = 0;// added new flagint time_pause = 0;// paused timeand I think the code would run down the incrementing to the last increment which should either print the segments as usual or goto a fixed print (pause) but not go back to the code until pressed again??? I can just about manage to put that in English never mind Arduino code.. Lol. :-/ Also I would have to add the time while paused to the next lap.Can you point me to any code that would have something like this or any hints on how to go about it.. pleeeeease...

// after the shifouts, read the pause button, set a flag if pressed, capture the time it was pressedpause_button_state = digitalRead(pause_button); if (pause_button == 0){ paused = 1; start_pausetime = millis(); }}

Hi Robert.. maybe it's late or I've been looking at this code too much but my mind is going all blank to this..I'm not sure how to place the code into my code??I'm not sure what to initialise or exactly what to change.. do I change

if (time_pause == 0){I tried to change it for my code etc but obviously I did it wrong as it wouldn't even compile??I will look at it again tomorrow and hopefully it will make more sense although any pointers to make it easier would be great.

Ah well, off to bed now for some ZZZzzzzzzzzzzzzzz's and wake up tomorrow to start a whole new year! 8-)

// after the shifouts, read the pause button, set a flag if pressed, capture the time it was pressed pause_button_state = digitalRead(pause_button); if (pause_button == 0){ paused = 1; start_pausetime = millis(); } }

// if paused, see for how long, if long enough clear the flag else { end_pausetime = millis(); elapsed_pausetime = end_pausetime - start_pausetime; // if (elapsed_pausetime >= pause_interval){ paused = 0; } } } // end if time to be updated} // end void loop

Hi Robert.. yea I think I was tired, I had way too many late nights reading code!! Lol.Anyway, I put the code in where you said but it wont pause?? I will keep mucking with it to see if I can get it running. Looking at the code if I short pin 6 to ground it should pause.. :-/ is this correct?This is where I put everything;

// after the shifouts, read the pause button, set a flag if pressed, capture the time it was pressed pause_button_state = digitalRead(pause_button); if (pause_button == 0){ paused = 1; start_pausetime = millis(); } }

// if paused, see for how long, if long enough clear the flag else { end_pausetime = millis(); elapsed_pausetime = end_pausetime - start_pausetime; // if (elapsed_pausetime >= pause_interval){ paused = 0; } } } // end if time to be updated} // end void loop

Hmm, yes I added some serial.prints where the shift outs, and I not seeing it pause either.I am out the door in 10 minutes for a fencing tournament, will look into this more when I get back.Not reading the pause button somehow.

// after the shifouts, read the pause button, set a flag if pressed, capture the time it was pressed pause_button_state = digitalRead(pause_button); if ([glow]pause_button_state[/glow] == 0){ paused = 1; start_pausetime = millis(); } }

// if paused, see for how long, if long enough clear the flag else { end_pausetime = millis(); elapsed_pausetime = end_pausetime - start_pausetime; // if (elapsed_pausetime >= pause_interval){ paused = 0; } } } // end if time to be updated} // end void loop