diff --git a/02_Arduino/controller_stm_PotiTest_NewFoc/controller_stm_PotiTest_NewFoc.ino b/02_Arduino/controller_stm_PotiTest_NewFoc/controller_stm_PotiTest_NewFoc.ino index 61c9c74..ae269bf 100644 --- a/02_Arduino/controller_stm_PotiTest_NewFoc/controller_stm_PotiTest_NewFoc.ino +++ b/02_Arduino/controller_stm_PotiTest_NewFoc/controller_stm_PotiTest_NewFoc.ino @@ -175,9 +175,9 @@ void loop() { if (millis() - last_send > SENDPERIOD) { - int16_t speedvalue=constrain(analogRead(PIN_POTI)*1.0/MAXADCVALUE*1000, 0, 1000); + int16_t speedvalue=constrain(analogRead(PIN_POTI)*1.0/MAXADCVALUE*1500, 0, 1500); - SendSerial1(speedvalue,0); + SendSerial1(speedvalue,speedvalue); Serial.print("millis="); Serial.print(millis()); Serial.print(", steer=0"); Serial.print(", speed="); Serial.println(speedvalue); last_send = millis();