     knobstate = 0;
     encoderValue = 0;
 
-    if (Serial.peek() == 'V') {      //check for the character that signifies that this will be on
+    if (Serial.peek() == 'V') {      //The 'V' character preced the PWM value for the PWM pin
       Serial.read();                 //remove the first character(V)
       Value = Serial.parseInt();     //read the value
       Serial.read();                 //remove the last character(S)

    }


    else if (Serial.peek() == 'K') {      //the character K must be sent to reset the timer and keep the analog pin ON
      Serial.read();                 //remove the first character
      timer = millis();              //reset the timer
    }

    else if (Serial.peek() == 'T') {      //check for the character T that estabilish the connection
      Serial.read();   //clean the serial buffer
      Serial.println("connOK");         //send a string




  }

  if (millis() - timer >= timelimit and knobstate == 0) { //turn off the pin after some time if no character 'K' is received
    analogWrite(pwmpin, 0);
  }

////rotary encoder stuffs:
  if (knobstate == 1) {
    updateButton();

