 }
 
 void loop() {
+  unsigned long currentMillis = millis();
   int joy = CheckJoystick();
   handleJoyStick(joy);
   if (prevRow != currentRow || prevCol != currentCol)


double currHLT = 150;
double currRIMS = 151;

boolean paused = true;
int mode = 0;
int prevmode = 0;

const int window = 5000; //Time in milliseconds to calculate duty cycle
long previousMillis = 0;
boolean BKon = false;
 
#define Neutral 0

  {
    case 0:
      //firing the HLT only
      if ((!paused) && (currHLT < setHLT) && (currHLT != 0))
      {
        elementOn(0);
      }
