set maximum poti speed to 1500

This commit is contained in:
interfisch 2019-12-13 21:54:21 +01:00
parent b7b0cf4e63
commit 1d9843a26c
1 changed files with 2 additions and 2 deletions

View File

@ -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();