Example project for the Line Follower robot.
Dependencies: PM2_Libary Eigen
Revision 52:60a710ecc162, committed 2022-05-16
- Comitter:
- pmic
- Date:
- Mon May 16 11:03:12 2022 +0200
- Parent:
- 51:b27f2beaf7b3
- Child:
- 53:155c309f7d75
- Commit message:
- Insert comment
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Sat May 14 17:26:49 2022 +0200
+++ b/main.cpp Mon May 16 11:03:12 2022 +0200
@@ -45,6 +45,7 @@
const float counts_per_turn = 20.0f * 78.125f; // define counts per turn at gearbox end: counts/turn * gearratio
const float kn = 180.0f / 12.0f; // define motor constant in rpm per V
+ // create SpeedController objects
SpeedController* speedControllers[2];
speedControllers[0] = new SpeedController(counts_per_turn, kn, max_voltage, pwm_M1, encoder_M1);
speedControllers[1] = new SpeedController(counts_per_turn, kn, max_voltage, pwm_M2, encoder_M2);
