V1
Dependents: VITI_motor_angle_1 VITI_motor_angle_2 VITI_motor_angle_3
Motor Class Reference
Interface to control a standard DC motor. More...
#include <TB6549.h>
Public Member Functions | |
Motor (PinName pwm, PinName in1, PinName in2, PinName sb) | |
Create a motor control interface. | |
void | speed (float speed) |
Set the speed of the motor. |
Detailed Description
Interface to control a standard DC motor.
with an H-bridge using a PwmOut and 3 DigitalOuts
Definition at line 15 of file TB6549.h.
Constructor & Destructor Documentation
Motor | ( | PinName | pwm, |
PinName | in1, | ||
PinName | in2, | ||
PinName | sb | ||
) |
Create a motor control interface.
- Parameters:
-
pwm A PwmOut pin, driving the H-bridge enable line to control the speed in1 A DigitalOut, in2 A DigitalOut, sb A DigitalOut,
Definition at line 11 of file TB6549.cpp.
Member Function Documentation
void speed | ( | float | speed ) |
Set the speed of the motor.
- Parameters:
-
speed The speed of the motor as a normalised value between -1.0 and 1.0
Definition at line 25 of file TB6549.cpp.
Generated on Sun Jul 24 2022 12:51:58 by 1.7.2