     }
   }
 
-  if(arTime-reset > wait){
+  if(arTime-reset > WAIT){
     reset = millis();
     if(binaryCounter < 512){
       binaryCounter++;

      actualCycle++;
    }else{
      actualCycle = 1;
      nextStep();
    }
  }


      endCycle = true;
      batteryCounter = 1;
      LEDSOFF();
      doPowerDown(SLEEP_4S, TIME_MULTIPLIER);
      
    }
  }
}


/*
 * Power down auxiliary function
 * 
 */
void doPowerDown(uint8_t sleepTime, uint8_t sleepCount) {
        do {
          LowPower.powerDown(sleepTime, ADC_OFF, BOD_OFF);
          sleepCount--;
        } while (sleepCount > 0);
}

/*
