one more question
I have a 8-digit 7 segment display MAX7219.
now I came across this against a stopwatch, sketch works, but they use there Pin 38, UNO32 's board.
My question is the sketch to fit for arduino UNO??which pin should I use???
This is the project
chipKIT Project 5: Digital stopwatch on seven segment LED display | Embedded Lab, with sketch.
Take your pick. I'd suggest you avoid using pins 0 or 1 but any other would do the trick. You'll have to modify the code accordingly.
In the sketch there is this comment
Start/Stop tact switch is connected to INT0 (Pin 38) pin.
then later on this line of code
attachInterrupt(0, Button_Pressed, FALLING);
So, the sketch uses interrupt 0. On a normal Uno interrupt 0 is in pin 2 so i seems logical that this is the pin that should be used.
See Interrupts for details
Note that these variables
long previousMillis = 0; long interval = 100;
would be better declared as unsigned longs to avoid problems with rollover to negative numbers that is alluded to on the chipKIT page.