|
Adafruit Motor Shield V2 Arduino Library
|
#include <Adafruit_MotorShield.h>
Public Member Functions | |
| Adafruit_DCMotor (void) | |
| Create a DCMotor object, un-initialized! You should never call this, instead have the Adafruit_MotorShield give you a DCMotor object with Adafruit_MotorShield.getMotor. | |
| void | run (uint8_t) |
| Control the DC Motor direction and action. More... | |
| void | setSpeed (uint8_t) |
| Control the DC Motor speed/throttle. More... | |
| void | setSpeedFine (uint16_t speed) |
| Control the DC Motor speed/throttle with 12 bit resolution. More... | |
| void | fullOn () |
| Set DC motor to full on. | |
| void | fullOff () |
| Set DC motor to full off. | |
Friends | |
| class | Adafruit_MotorShield |
| Let MotorShield create DCMotors. | |
Object that controls and keeps state for a single DC motor
| void Adafruit_DCMotor::run | ( | uint8_t | cmd | ) |
Control the DC Motor direction and action.
| cmd | The action to perform, can be FORWARD, BACKWARD or RELEASE |
| void Adafruit_DCMotor::setSpeed | ( | uint8_t | speed | ) |
Control the DC Motor speed/throttle.
| speed | The 8-bit PWM value, 0 is off, 255 is on |
| void Adafruit_DCMotor::setSpeedFine | ( | uint16_t | speed | ) |
Control the DC Motor speed/throttle with 12 bit resolution.
| speed | The 12-bit PWM value, 0 (full off) to 4095 (full on) |
1.8.13