motorcontroller.h File Reference


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 Documentation

#define SETPOINT   110


Function Documentation

double dController ( void   ) 

Derrivative controller.

Returns:
The derrivative value

double pController ( void   ) 

Proportional controller.

Returns:
The proportional value

double setError ( double  presentValue  ) 

Calculate the error.

Parameters:
presentValue Frequency to determine the error from
Returns:
The current error

void setMotorSpeed ( double  uTotal  ) 

Sets the speed and direction of the motor.

Parameters:
uTotal Value calculated by the PD-controller

void setPortD ( void   ) 

Set portD as output.


Generated on Sat Jun 9 13:19:03 2007 for Automatisk Guitartuner by  doxygen 1.5.2