         lcd.setCursor(10, 1);
         lcdPrintFormattedSecs(countdown);
         lcd.print(F("    "));
-        
+
         countdown*= (long)1000;                       //*** to save space, the ATmega328P chip of UNO uses 2-byte ints, which can hold at max 32 767; operator*(int, int) will still return an int, but in this case an overflowed int;
                                                       //*** initSetTime, a long, will just be assigned the overflowed value--it won't force operator*(int, int) to return a long.
                                                       //*** so, by typecasting 1000 or using 1000L, you make the compiler promote analogRead() to a long, so operator*(long, long) will return the expected value, within range of sizeof long

        lcd.setCursor(11, 2);
        lcd.print(motorSpeed);
        lcd.print(F("  "));
        
        spinningStartTime = millis();
        
        mode = Mode::SPINNING;
      }
      break;
    }
  
    
    case Mode::SPINNING:
    {
      unsigned long secondsLeft = (countdown - (millis() - spinningStartTime))/1000;  //*** save RAM AND flash memory by only doing this calculation once per case in loop()
      analogWrite(MOTOR_PIN, motorSpeed);
      
      lcd.setCursor(0, 1);
      lcd.print(F("Finished in: "));
      lcdPrintFormattedSecs(secondsLeft);
      lcd.print(F("  "));
  
      if(wpb.pressed() || secondsLeft == 0)
      {
        digitalWrite(MOTOR_PIN, LOW);

      }
      break;
    }
  }
}

inline void lcdPrintFormattedSecs(unsigned long seconds) //*** inline = suggestion to the compiler to paste the raw code of this function wherever it's called == performance optimization, no hopping pointers to callers and callbacks
{
  //***
  lcd.print(seconds/60); lcd.print(F(":")); lcd.print((seconds%60 < 10 ? F("0") : F(""))); lcd.print(seconds%60);
}
