SHARE
TWEET

timer

a guest Aug 20th, 2019 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2.               //determine lap time in milliseconds
  3.               lapMillis = millis() - startMillis;
  4.               startMillis = millis();
  5.  
  6.               lapTime = lapMillis / 1000.00;
  7.  
  8.               //if firs trigger print race started
  9.               if (firstTrigger == true)
  10.               {
  11.                 lcd.setCursor(0, 0);
  12.                 lcd.print("Race Started!    ");
  13.                 lcd.setCursor(0, 1);
  14.                 lcd.print("                 ");
  15.               }
  16.  
  17.               //print if not first trigger
  18.               if (firstTrigger != true)
  19.               {
  20.                 Serial.print("lapTime: ");
  21.                 Serial.println(lapTime);
  22.                 Serial.print("lapMillis: ");
  23.                 Serial.println(lapMillis);
  24.                 //print lap time
  25.                 lcd.setCursor(0, 0);
  26.                 lcd.print("Last: ");
  27.                 lcd.print(lapTime);
  28.                 lcd.print("       ");
  29.               }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top