 
 void loop()
 {
-  State = Startup;
-
   switch (State) 
   {
     case Startup:
-      do doStartup();
+      doStartup();
       break;
     case Operational:
       dataRead();

  Serial.println("Max Following Error set as 5000rpm/s");
  delay(10);
  CAN.sendMsgBuf(0x601, 0, 8, set_max_profile_velocity);
  Serial.println("Max Profile Velocity set as 2000rpm");
  delay(10);
  
  delay(10);
  State = Operational;
}

  unsigned char buf[8];

    Serial.println("Enviei a mensagem");
    // Serial.println(setpoint_position,HEX);
    // clear the string:
    CAN.sendMsgBuf(0x601, 0, 8, setpoint_position);
    delay(10);
