Hello, I hope everyone fine , I need to make a stopwatch using 7 segment, 74HC595 chip, push button and arduino uno ,
What i want is when i press the button, the timer stop and shows the numbers!
the code below start from 0 to 9
int DS_pin1 = 13;
int STCP_pin1 =12;
int SHCP_pin1 = 11;
void setup() {
pinMode(DS_pin1, OUTPUT);
pinMode(STCP_pin1, OUTPUT);
pinMode(SHCP_pin1, OUTPUT);
void loop() {
for (int K=0;K<10;K++){
for (int H=0;H<10;H++){
digitalWrite(STCP_pin1,LOW);
shiftOut(DS_pin1, SHCP_pin1, LSBFIRST,dec_digits1[H]);
shiftOut(DS_pin1, SHCP_pin1, LSBFIRST,dec_digits1[K]);
digitalWrite(STCP_pin1, HIGH);
delay(100);
}
}
}
Thank you all

