Browse Source

The coden that WORKS!!!

master
parent
commit
2b372cd3f9
1 changed files with 6 additions and 6 deletions
  1. +6
    -6
      pid-example/pid-example.ino

+ 6
- 6
pid-example/pid-example.ino View File

@@ -4,9 +4,9 @@ QTRSensors qtr;
const uint8_t SensorCount = 8;
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 Kd = 0.7;
float Kd = 0.6;
int P;
int I;
int D;
@@ -22,10 +22,10 @@ const uint8_t basespeedb = 100;

//Set up the drive motor carrier pins
int mode = 8;
int aphase = 9;
int aenbl = 6;
int bphase = 5;
int benbl = 3;
int aphase = 5;
int aenbl = 3;
int bphase = 9;
int benbl = 6;

//Set up the buttons pins
int buttoncalibrate = 17; //pin A3


Loading…
Cancel
Save