/* 23/07/21 * delayMillisv3 * Basics of millis(). */ int q; unsigned long timer1 = 0; unsigned long timer2 = 2000; unsigned long timer3 = 4000; void setup() { // Serial.begin(9600) starts serial communication. 9600bps bits per second = 1200 characters per second Serial.begin(9600); //Send script name Serial.println("delayMillisv3..."); //this will print a blank line Serial.println(" "); } void loop(){ if(millis() > timer1){ //take the current time and add 6 seconds (6000); timer1 = millis() + 6000; Serial.println("1st Item"); } if(millis() > timer2){ //take the current time and add 6 seconds (6000); timer2 = millis() + 6000; Serial.println("2nd Item"); } if(millis() > timer3){ //take the current time and add 6 seconds (6000); timer3 = millis() + 6000; Serial.println("3rd Item"); } }