Dependents:   nhk_2018_undercarry_test04 nhk_2018_undercarry_test08 nhk_2018_undercarry_test09 nhk_2018_undercarry_test10 ... more

PID.h

Committer:
kenken0721
Date:
2018-01-16
Revision:
0:d8b5fa590ca2
Child:
3:3bc8034f569e

File content as of revision 0:d8b5fa590ca2:

#ifndef PID_H
#define PID_H

#include "mbed.h"

class PID {
private:
    Timer timer;
    double Setpoint;
    double KP;
    double KI;
    double KD;
    unsigned long dt;
    unsigned long preTime;
    double P;
    double I;
    double D;
    double preP;
public:
    PID(double,double,double,double);
    void init();
    double compute(double);
};

#endif