Defines | |
#define | SETPOINT 110 |
Functions | |
void | setPortD (void) |
Set portD as output. | |
void | setMotorSpeed (double uTotal) |
Sets the speed and direction of the motor. | |
double | setError (double presentValue) |
Calculate the error. | |
double | pController (void) |
Proportional controller. | |
double | dController (void) |
Derrivative controller. |
#define SETPOINT 110 |
double dController | ( | void | ) |
Derrivative controller.
double pController | ( | void | ) |
Proportional controller.
double setError | ( | double | presentValue | ) |
Calculate the error.
presentValue | Frequency to determine the error from |
void setMotorSpeed | ( | double | uTotal | ) |
Sets the speed and direction of the motor.
uTotal | Value calculated by the PD-controller |
void setPortD | ( | void | ) |
Set portD as output.