Skip to content

Commit a6af2f9

Browse files
Changed balance bot
DC prescaller Example coefficients
1 parent 231fe92 commit a6af2f9

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

examples/RoboHeartBalanceBot/RoboHeartBalanceBot.ino

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
RoboHeart heart = RoboHeart(Serial);
2525

2626
// PID controller parameters.
27-
#define Kp 20
28-
#define Kd 0
29-
#define Ki 40
27+
#define Kp 7
28+
#define Ki 2
29+
#define Kd 0.01
3030

3131
#define CONTROL_TICK_PERIOD_US 100.0
3232

@@ -35,7 +35,7 @@ RoboHeart heart = RoboHeart(Serial);
3535
#define DC_CONTROL_PRESCALER 15 // Control ticks passing before DC Motor Control
3636
#define STATISTICS_PRESCALER \
3737
DC_CONTROL_PRESCALER * \
38-
4 // Control ticks passing before all the debug printing is performed
38+
2 // Control ticks passing before all the debug printing is performed
3939

4040
// Motor control parameters
4141
float prevAngleDeg = 0; // Store previos angle

examples/RoboHeartBalanceBotContol/RoboHeartBalanceBotContol.ino

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@
2828
RoboHeart heart = RoboHeart(Serial);
2929

3030
// PID controller parameters.
31-
#define Kp 20
32-
#define Kd 0
33-
#define Ki 40
31+
#define Kp 7
32+
#define Ki 2
33+
#define Kd 0.01
3434

3535
#define CONTROL_TICK_PERIOD_US 100.0 // Control tick period in micro-seconds
3636

examples/RoboHeartPIDFittingExample/RoboHeartPIDFittingExample.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ int Ki = 0;
3131
#define DC_CONTROL_PRESCALER 15 // Control ticks passing before DC Motor Control
3232
#define STATISTICS_PRESCALER \
3333
DC_CONTROL_PRESCALER * \
34-
4 // Control ticks passing before all the debug printing is performed
34+
2 // Control ticks passing before all the debug printing is performed
3535

3636
// Motor control parameters
3737
float prevAngleDeg = 0; // Store previos angle

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=RoboHeart
2-
version=2.1.4
2+
version=2.1.5
33
author=Augmented Robotics
44
maintainer=Augmented Robotics <[email protected]>
55
sentence=Arduino library for the RoboHeart

0 commit comments

Comments
 (0)