 
 void sendFeedback()
 {
+  // All the feedback values are normalized in the range 0-1023 (10 bits resolution)
   if (isFeedbackRequested)
   {
-    Serial.print((power1+128)*4);
+    Serial.print((power1+127)*4);
     Serial.print(", ");
-    Serial.print((power2+128)*4);
+    Serial.print((power2+127)*4);
     Serial.print(", ");
-    Serial.print((Input1+1)*512);
+    Serial.print((Input1+1)/2*1023);
     Serial.print(", ");
-    Serial.print((Input2+1)*512);
+    Serial.print((Input2+1)/2*1023);
     Serial.print(", ");
-    Serial.print((Input3+1)*512);
+    Serial.print((Input3+1)/2*1023);
     Serial.println("");
     isFeedbackRequested = false;
   }

// Linear encoder
#define LINEAR_RESOLUTION 0.005
#define LINEAR_USED_RANGE 0.05
void computeFeedback()
{
  
  // Feedbacks are normalized between -1 and 1
  
  // Potentiomete angle
  float rawAngle_deg = analogRead(POT_PIN)/1024.0*POT_RANGE_DEG;
  Input1 = (rawAngle_deg - NEUTRAL_ANGLE_DEG)/POT_USED_RANGE_DEG;
  
  // Linear encoder position
  Input2 = halfSteps*LINEAR_RESOLUTION/2/LINEAR_USED_RANGE;
  // Correct for lever arm (potentiometer not on axis)
  Input2+= (rawAngle_deg - NEUTRAL_ANGLE_DEG)* POT_OFFSET*3.14/180;
  
  // Line tension
  Input3 = analogRead(LINE_TENSION_PIN)/512 - 1;

TinyGPSPlus nmea;
// O stands for Opensource, R for Robokite
// The index is the place of the field in the NMEA message
TinyGPSCustom feedback_request      (nmea, "ORFBR", 1);  // Feedback request. The feedback are normalized between 0 and 1023
// The orders are normalized between -127 and 127
TinyGPSCustom pwm1     (nmea, "ORPW1", 1);  // Dimentionless voltage setpoint (Pulse Width Modulation) for Sabertooth output 1
TinyGPSCustom pwm2     (nmea, "ORPW2", 1);  // Dimentionless voltage setpoint (Pulse Width Modulation) for Sabertooth output 2
TinyGPSCustom setpos1  (nmea, "ORSP1", 1);  // Position setpoint for Sabertooth output 1
