Azhar:
int Second;
int S;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
}void loop() {
// put your main code here, to run repeatedly:
int startmillis=millis();
int currentmillis=0;
if(startmillis-currentmillis>=1000){startmillis=currentmillis;
Serial.print(Second);
Second=S+1;
}}
some thing like that ???
Pretty decent first attempt. When using milli, the numbers are quite large. So, you'll want to use "unsigned long" instead of "int" for your start and current. And move startmillis and current millis prior to setup.
Edit. You could leave current millis where it is.