The coden that WORKS!!!

This commit is contained in:
Γιώργος Αντρέου 2022-06-24 23:25:55 +03:00
parent ca072ae8bb
commit 2b372cd3f9

View file

@ -4,9 +4,9 @@ QTRSensors qtr;
const uint8_t SensorCount = 8; const uint8_t SensorCount = 8;
uint16_t sensorValues[SensorCount]; uint16_t sensorValues[SensorCount];
float Kp = 0.06; //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.7; float Kd = 0.6;
int P; int P;
int I; int I;
int D; int D;
@ -22,10 +22,10 @@ const uint8_t basespeedb = 100;
//Set up the drive motor carrier pins //Set up the drive motor carrier pins
int mode = 8; int mode = 8;
int aphase = 9; int aphase = 5;
int aenbl = 6; int aenbl = 3;
int bphase = 5; int bphase = 9;
int benbl = 3; int benbl = 6;
//Set up the buttons pins //Set up the buttons pins
int buttoncalibrate = 17; //pin A3 int buttoncalibrate = 17; //pin A3