 #define MOTOR_DISABLE_PIN 8
 
 // uptime //
-byte NewSecond = 0;
 byte HalfSecond = 0;
 unsigned long uptimeSeconds = 0;
 


void MaintainUptime()
{
  if (millis() % 1000 <= 500 && HalfSecond == 0)
  {
    NewSecond = 1;
    HalfSecond = 1;
  }

  if (millis() % 1000 > 500) HalfSecond = 0;

  if (NewSecond == 1)
  {
    uptimeSeconds++;
    NewSecond = 0;
  }
} 

//=======================================

  // serial input
  ReadSerial();
  if (IsConnected) CheckCommandTimeout();
  if (driveEnabled) checkDriveCommandTimeout();
  ReadAmps();
  DisplayVA();
  
