int nr=0; void setup() { pinMode(5, OUTPUT); Serial.begin(115200); Serial.println("Algus"); } void loop() { digitalWrite(5, HIGH); // turn the LED on (HIGH is the voltage level) delay(1000); // wait for a second digitalWrite(5, LOW); // turn the LED off by making the voltage LOW delay(2000); // wait for a second nr++; Serial.println(nr); }