Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
PID.h
- Committer:
- benkatz
- Date:
- 2013-06-28
- Revision:
- 2:89bb6272869b
- Child:
- 3:cae0b305d54c
File content as of revision 2:89bb6272869b:
//Ben Katz, 2013
//PID Controller class
#include "mbed.h"
#ifndef PID_H
#define PID_H
class PIDController{
public:
PIDController(float desired_position, float p_gain, float d_gain, float i_gain);
~PIDController();
float goal_position;
float kp;
float kd;
float ki;
float error;
float old_error;
float integral_error;
float Update(void);
private:
};
#endif