Motor class for the robot
Motorslam Class Reference
Interface created to control left and right motors of SLAM robot TB6612FNG is the motor driver(H-bridge,dual motor driver) More...
#include <Motorslam.h>
Public Member Functions | |
Motorslam (PinName pinPwmLeft, PinName pinLeftIn1, PinName pinLeftIn2, PinName pinPwmRight, PinName pinRightIn1, PinName pinRightIn2, PinName pinNStby) | |
Create an interface to connect TB6612FNG with mbed LPC1768. | |
void | init () |
Set the speed of the motor. |
Detailed Description
Interface created to control left and right motors of SLAM robot TB6612FNG is the motor driver(H-bridge,dual motor driver)
Definition at line 19 of file Motorslam.h.
Constructor & Destructor Documentation
Motorslam | ( | PinName | pinPwmLeft, |
PinName | pinLeftIn1, | ||
PinName | pinLeftIn2, | ||
PinName | pinPwmRight, | ||
PinName | pinRightIn1, | ||
PinName | pinRightIn2, | ||
PinName | pinNStby | ||
) |
Create an interface to connect TB6612FNG with mbed LPC1768.
- Parameters:
-
pwmLeft,PWM output from mbed is channelled to Left Motor to control speed leftIn1,DigitalOut1 pin of mbed set to HIGH(1) to move motor forward leftIn2,DigitalOut2 pin of mbed set to HIGH(1) to move motor backwards
Definition at line 8 of file Motorslam.cpp.
Member Function Documentation
void init | ( | ) |
Set the speed of the motor.
- Parameters:
-
speed The speed of the motor is normalised between -1.0 and 1.0
Definition at line 31 of file Motorslam.cpp.
Generated on Wed Jul 13 2022 20:57:04 by 1.7.2