  */
 void toggle() {
   static uint8_t out = 0;
-  out = (out <= 0) ? MAX_PWM : out - 33;
+  out = (out <= 0) ? MAX_PWM : out - MAX_PWM/3;
   int fan = (out <= 0) ? 0 : min(out+25,100);
   analogWrite(PWM_PIN,(((uint16_t)out)*256)/100);
-  analogWrite(FAN_PIN,(((uint16_t)out)*256)/100);
+  analogWrite(FAN_PIN,(((uint16_t)fan)*256)/100);
+  Serial.println((((uint16_t)out)*256)/100);
 }
 
 /**

  CommandPacket* cmd = getCommand(CLOSE);
  sendCommand(cmd);
  free(cmd);
  Serial.end();
  setup();*/
}



//Error pin to flash on error
int ERROR_PIN = 13;
int PWM_PIN = 23;
int FAN_PIN = 22;
//Maximum percentage
int MAX_PWM = 66;
//One unit of delay (in ms)
int DELAY = 250;

#define HWSerial Serial1

/**
 * Enumeration of commands
 * Value set to control code of command
