|
| | Motor (PinName pwm, PinName dir, PinName bip, PinName CH_A, PinName CH_B, int pulsePerRev, int pwmFreq, int updateRate, float LowPass_a0, float LowPass_b0, float LowPass_b1, float wheelRadius) |
| | Construct a new Motor object.
|
| |
| void | set_direction (bool DirState) |
| | Set the direction of the motor.
|
| |
| void | set_bipolar_mode (bool BipState) |
| | Set the bipolar mode of the motor.
|
| |
| void | set_duty_cycle (float DutyCycle) |
| | Set the duty cycle of the motor.
|
| |
| bool | get_direction () |
| | Get the direction of the motor.
|
| |
| bool | get_bipolar_mode () |
| | Get the bipolar mode of the motor.
|
| |
| float | get_duty_cycle () |
| | Get the duty cycle of the motor.
|
| |
| void | update (void) |
| | Calculate and update all the speed variables.
|
| |
| void | reset (void) |
| | Reset the encoder tick count.
|
| |
| int | get_tick_count (void) |
| | Get the cumulative tick count.
|
| |
| float | get_rotational_freq (void) |
| | Get the rotational frequency of the motor in revolutions per second (rev/s).
|
| |
| float | get_rpm (void) |
| | Get the revolutions per minute (RPM) of the motor.
|
| |
| float | get_speed (void) |
| | Get the tangential speed of the wheel.
|
| |
| float | get_filtered_speed (void) |
| | Get the low-pass filtered speed of the wheel.
|
| |
Represents a motor with integrated quadrature encoder for the buggy.
This class provides functionality to control the speed and direction of the motor, read encoder tick counts, and calculate various parameters such as rotational frequency, speed, and revolutions per minute (RPM). It also includes a low-pass filter for noise reduction in speed measurements.
Definition at line 21 of file motor.h.