     delay(1000);
 }
 
+//***************
+// DATA READ
+//***************
 void DataRead(void) {
-
-  //***************
-  // DATA READ
-  //***************
-
   unsigned char len = 0;
   unsigned char buf[8];
 

  State = Operational;
}

void PositionSetpoint(void) {

  //***************
  // OUTPUT
  //***************

  unsigned char len = 0;
  unsigned char buf[8];

    delay(300);
}

//*****************************************
// POTENTIOMETER INPUT
//*****************************************
void PotRead(void) {

  // read the analog in value:
  sensorValue = analogRead(analogInPin);
  delay(10);

  // map it to the range of the analog out:
  uint32_t angulo = map(sensorValue, 0, 960, 0, 3600);

  // print the results to the serial monitor:
  Serial.print("sensor = ");
  Serial.print(sensorValue);
  Serial.print("\t");
  Serial.print("\t output = ");
  Serial.println(angulo);

  //setpoint_position_position[6]+=10;
  angulo *= 200000 / 3600;
