![](/media/cache/group/coe.jpg.50x50_q85.jpg)
Create a motor object, to control a motor using L293DNE and FDRM-KL46z.
Dependencies: mbed
Motor Class Reference
Motor class, create motor object to control speed and direction. More...
#include <Motor.h>
Public Member Functions | |
Motor (PinName Positive, PinName Negative) | |
Create a motor object. | |
void | Direction (int move) |
control the direction of the movement | |
void | Stop () |
Stop the motor. | |
void | Speed (int motor_speed) |
control the speed of the motor object |
Detailed Description
Motor class, create motor object to control speed and direction.
Example:
#include "mbed.h" #include "Motor.h" Motor my_motor(P12,P13P,p11); int main() { my_motor.Direction(LEFT); wait(0.1); }
Definition at line 21 of file Motor.h.
Constructor & Destructor Documentation
Motor | ( | PinName | Positive, |
PinName | Negative | ||
) |
Member Function Documentation
void Direction | ( | int | move ) |
void Speed | ( | int | motor_speed ) |
Generated on Wed Jul 20 2022 09:24:43 by
![doxygen](doxygen.png)