 delay(100);
 
 }
-
-
-
-


    
 if(mode == CONSTANT_POWER) {
    byte encoderPos = getEncoderMovement();       //getEncoderMovement() returns either -1, 0 or 1
    if(encoderPos > 0 && ISetVal < ISET_CP_MAX)   //Encoder incremented
      ISetVal+=ISET_CP_STEP;
    else if (encoderPos < 0 && ISetVal >= ISET_CP_STEP)   //Encoder decremented


  
 if(mode == CONSTANT_RESISTANCE) {
    int encoderPos = getEncoderMovement();       //getEncoderMovement() returns either -1, 0 or 1
    if(encoderPos > 0 && ISetVal < ISET_CR_MAX)   //Encoder incremented
      ISetVal+=ISET_CR_STEP;
    else if (encoderPos < 0 && ISetVal >= ISET_CR_MIN)   //Encoder decremented
