Example project for the Line Follower robot.
Dependencies: PM2_Libary Eigen
Diff: main.cpp
- Revision:
- 52:60a710ecc162
- Parent:
- 51:b27f2beaf7b3
- Child:
- 53:155c309f7d75
--- 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);