From 2b372cd3f9d10da56efd1cbacaf096295e7243a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=CE=93=CE=B9=CF=8E=CF=81=CE=B3=CE=BF=CF=82?= Date: Fri, 24 Jun 2022 23:25:55 +0300 Subject: [PATCH] The coden that WORKS!!! --- pid-example/pid-example.ino | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pid-example/pid-example.ino b/pid-example/pid-example.ino index 8ef8d47..28b909f 100644 --- a/pid-example/pid-example.ino +++ b/pid-example/pid-example.ino @@ -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