rec::robotino::com::Motor Class Reference
Represents a single motor.
More...
#include <Motor.h>
List of all members.
Detailed Description
Represents a single motor.
Member Function Documentation
| static unsigned int rec::robotino::com::Motor::numMotors |
( |
|
) |
[static] |
- Returns:
- Returns the number of drive motors on Robotino
- Exceptions:
-
| void rec::robotino::com::Motor::setMotorNumber |
( |
unsigned int |
number |
) |
|
Sets the number of this motor.
- Parameters:
-
| number | number of this motor |
- Exceptions:
-
| void rec::robotino::com::Motor::setSpeedSetPoint |
( |
float |
speed |
) |
|
Sets the setpoint speed of this motor.
- Parameters:
-
| speed | Set point speed in rpm. |
- Exceptions:
-
| void rec::robotino::com::Motor::resetPosition |
( |
|
) |
|
Resets the position of this motor.
- Exceptions:
-
| void rec::robotino::com::Motor::setBrake |
( |
bool |
brake |
) |
|
Controls the brakes of this motor.
- Parameters:
-
| brake | If set to TRUE, the speed set-point is constantly set to 0. If set to FALSE, the speed set-point can be set by setSpeedSetPoint. |
- Exceptions:
-
| void rec::robotino::com::Motor::setPID |
( |
unsigned char |
kp, |
|
|
unsigned char |
ki, |
|
|
unsigned char |
kd | |
|
) |
| | |
Sets the proportional, integral and differential constant of the PID controller. The range of values is from 0 to 255. These values are scaled by the microcontroller firmware to match with the PID controller implementation. If 255 is given, the microcontroller firmware uses its build in default value.
- Parameters:
-
| kp | proportional constant. Typical value 200. |
| ki | integral constant. Typical value 10. |
| kd | differential constant. Typical value 0. |
- Exceptions:
-
| float rec::robotino::com::Motor::actualVelocity |
( |
|
) |
const |
Retrieves the actual speed of this motor.
- Returns:
- Speed in rpm.
- Exceptions:
-
| int rec::robotino::com::Motor::actualPosition |
( |
|
) |
const |
Retrieves the actual position of this motor.
- Returns:
- actual position
- Exceptions:
-
| float rec::robotino::com::Motor::motorCurrent |
( |
|
) |
const |
Retrieves the current of this motor.
- Returns:
- motor current in A.
- Exceptions:
-
| unsigned short rec::robotino::com::Motor::rawCurrentMeasurment |
( |
|
) |
const |
The current is measured by a 10 bit adc and is not converted into A.
- Returns:
- The current delivered by to this motor. Range from 0 to 1023 with I/O board version 1.x. I/O board version 2 uses a 12bit ADC. Range is then [0;4098].
- Exceptions:
-
The documentation for this class was generated from the following file:
- /home/verbeek/openrobotino_src/openrobotino1/lib/rec/robotino/com/Motor.h