|
EMBER 0.1
EMBER is a fire suppression system with a thermal IR camera for hot blob detection on a pan/tilt mechanism with a solenoid for commanded water flow.
|
A class to add basic functions for DRV8871 Motor Driver. More...
#include <DRV8871Driver.h>
Public Member Functions | |
| DRV8871Driver (uint8_t in1, uint8_t in2) | |
| Constructor function which initializes the motor driver. | |
| void | driveMotor (uint8_t speed, bool dir) |
| Function which drives the motor at a specified speed and direction. | |
| void | coastMotor (void) |
| Coast motor to stop - lets the motor spin down by itself. | |
| void | brakeMotor (void) |
| Brake the motor Quickly - uses active braking to stop the motor. | |
Protected Attributes | |
| uint8_t | in1Pin |
| uint8_t | in2Pin |
A class to add basic functions for DRV8871 Motor Driver.
This class enables drive, coast, and brake functions for a DRV8871 motor driver. It uses PWM for speed control and a digital pin for direction control. This class uses 8 bit PWM resolution, so speed values should be integers from 0 to 255.
| in1 | PWM output pin (uses analogWrite) |
| in2 | Direction pin (uses digitalWrite) |
| DRV8871Driver::DRV8871Driver | ( | uint8_t | in1, |
| uint8_t | in2 ) |
Constructor function which initializes the motor driver.
| in1 | PWM output pin |
| in2 | Direction pin |
| void DRV8871Driver::driveMotor | ( | uint8_t | speed, |
| bool | dir ) |
Function which drives the motor at a specified speed and direction.
| speed | unsigned speed value. Range: 0 to max based on resolution |
| dir | Direction (true/false) written to the direction pin |