Updated and refined for the Robotex 2023 competition!
This should enable the robot to get higher speeds than last year. At our test drive its best time was around 10-11 seconds.
This commit is contained in:
parent
528be81e61
commit
6163744cc9
|
@ -6,7 +6,7 @@ uint16_t sensorValues[SensorCount];
|
||||||
|
|
||||||
float Kp = 0.07;//set up the constants value
|
float Kp = 0.07;//set up the constants value
|
||||||
float Ki = 0.0008;
|
float Ki = 0.0008;
|
||||||
float Kd = 0.6;
|
float Kd = 0.34;
|
||||||
int P;
|
int P;
|
||||||
int I;
|
int I;
|
||||||
int D;
|
int D;
|
||||||
|
@ -15,10 +15,10 @@ int lastError = 0;
|
||||||
boolean onoff = false;
|
boolean onoff = false;
|
||||||
|
|
||||||
//Increasing the maxspeed can damage the motors - at a value of 255 the 6V motors will receive 7,4 V
|
//Increasing the maxspeed can damage the motors - at a value of 255 the 6V motors will receive 7,4 V
|
||||||
const uint8_t maxspeeda = 150;
|
const uint8_t maxspeeda = 200;
|
||||||
const uint8_t maxspeedb = 150;
|
const uint8_t maxspeedb = 200;
|
||||||
const uint8_t basespeeda = 100;
|
const uint8_t basespeeda = 150;
|
||||||
const uint8_t basespeedb = 100;
|
const uint8_t basespeedb = 150;
|
||||||
|
|
||||||
//Set up the drive motor carrier pins
|
//Set up the drive motor carrier pins
|
||||||
int mode = 8;
|
int mode = 8;
|
||||||
|
|
Loading…
Reference in a new issue