set maximum poti speed to 1500
This commit is contained in:
parent
b7b0cf4e63
commit
1d9843a26c
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue