 #define Pre_Operational     2
 #define Operational         3
 
+// Define CANDataRead States
+#define Current_State       1
+#define Position_State      2
+#define Amplification_State 3
+
 // Statemachine State variable and initial value
 byte State = Startup;
+byte DataReadState = Current_State;
 
 // the cs pin of the version after v1.1 is default to D9
 // v0.9b and v1.0 is default D10

  {
    CAN.readMsgBuf(&len, buf);    // read data,  len: data length, buf: data buf
    unsigned int canId = CAN.getCanId();

    switch (canId) 
    {        
      case 0x181:
        Serial.println("-----------------------------");
        Serial.print("CORRENTE: ");
        Serial.println(canId, HEX);

      // positionSetpoint(encoder_data);
      break;
  }
  delay(50);
}

/*********************************************************************************************************
