New class and code for part 4

This commit is contained in:
2026-09-18 13:44:09 +00:00
parent 8c5f98c8df
commit 811e3540f6
7 changed files with 161 additions and 8 deletions
+2
View File
@@ -11,6 +11,8 @@ public:
void forward();
void reverse();
void stop();
void set(double pwm);
};
#endif
+15
View File
@@ -0,0 +1,15 @@
#ifndef P_CONTROLLER_H
#define P_CONTROLLER_H
class P_controller
{
private:
double Kp;
public:
P_controller(double Kp);
double update(double ref, double actual);
};
#endif