   }
   if (myPID2.GetMode() ==AUTOMATIC)
   {
-    double offset_m = -0.02;
+    double offset_m = -0.0;
     Setpoint2 = StrToFloat(setpos2.value()) + offset_m/linearRange;
     myPID2.Compute();
     alphaSigned2 = Output2;

  
  // read the analog in value:
  double raw_angle = analogRead(potPin)/1024.0*potentiometerMaxRange;
  double neutralAngle = 0.8*potentiometerMaxRange;
  double angle = raw_angle - neutralAngle;
  double correction_m = angle*potentiometerDistance;
  Input1 = angle/potentiometerUsedRange;
  Input2 = absolute_position_m/linearRange;
  Input3 = analogRead(tensionPin);
  //Serial.print("P");
  //Serial.println(Input1);

  {
    //lastWriteTime = millis();
    
    Serial.print((alphaSigned1+1)*512);
    Serial.print(", ");
    Serial.print((alphaSigned2+1)*512);
    Serial.print(", ");
    Serial.print((Input1+1)*512);
    Serial.print(", ");
    Serial.print((Input2+1)*512);
    Serial.print(", ");
    Serial.print(Input3);
    Serial.print(", ");
    Serial.println(Input3);
    
    //isConnectionAlive = false;
    isFeedbackRequested = false;
    digitalWrite(ledPin, LOW);
