Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
SMC02B Class Reference
Pololu Micro Dual Serial Motor Controller. More...
#include <SMC02B.h>
Public Member Functions | |
SMC02B (PinName tx, PinName rx, PinName rst) | |
Constructor. | |
void | SMC02B_RST (void) |
Reset SMC02B. | |
void | SMC02B_MOTOR_SET (char motor, char direction, char speed) |
Set Motor. | |
void | SMC02B_MOTOR_BRAKE (char motor) |
Set Motor to Brake. | |
void | SMC02B_MOTOR_COAST (char motor) |
Set Motor to idle. | |
void | SMC02B_CONFIG (char mode, char motor) |
Configure SMC02B. |
Detailed Description
Pololu Micro Dual Serial Motor Controller.
Definition at line 64 of file SMC02B.h.
Constructor & Destructor Documentation
SMC02B | ( | PinName | tx, |
PinName | rx, | ||
PinName | rst | ||
) |
Constructor.
Includes.
- Parameters:
-
tx mbed pin to use for TX line of Serial. rx mbed pin to use for RX line of Serial. rst mbed pin to use for RESET.
Definition at line 6 of file SMC02B.cpp.
Member Function Documentation
void SMC02B_CONFIG | ( | char | mode, |
char | motor | ||
) |
Configure SMC02B.
- Parameters:
-
mode - Set mode 1 or 2 motor mode. 0 - 2 motors 1 - 1 motor motor - Motor number.
Allways reset SMC02B after a config
Definition at line 65 of file SMC02B.cpp.
void SMC02B_MOTOR_BRAKE | ( | char | motor ) |
Set Motor to Brake.
- Parameters:
-
motor - Motor to be controlled.
Definition at line 40 of file SMC02B.cpp.
void SMC02B_MOTOR_COAST | ( | char | motor ) |
Set Motor to idle.
- Parameters:
-
motor - Motor to be controlled.
Definition at line 50 of file SMC02B.cpp.
void SMC02B_MOTOR_SET | ( | char | motor, |
char | direction, | ||
char | speed | ||
) |
Set Motor.
- Parameters:
-
motor - Motor to be controlled. direction - Motor Direction. 0 - Reverse 1 - Forward speed - Motor Speed. 0 - 127 ( 0x7F )
Definition at line 30 of file SMC02B.cpp.
void SMC02B_RST | ( | void | ) |
Reset SMC02B.
Definition at line 12 of file SMC02B.cpp.
Generated on Mon Jul 18 2022 14:45:04 by
