Arduino library to drive an DRV8833 IC.
- Control forward and backward movements
- PWM speed control in both directions
- Custom brake and coast deceleration rates
- Drive two DC motors or one stepper motor
- 1.5A per H-Bridge (2A peak)
- 2.7V - 10.8V Input voltage
- Create interface for moving a stepper motor
- Arduino
#include <Arduino.h>
#include "DRV8833.h"
const int motorA_in1 = 10;
const int motorA_in2 = 11;
DRV8833_DCMotor motorA(motorA_in1, motorA_in2);
int motor_speed = 255;
void setup() {
// Stop the motor
motorA.brake();
}
void loop() {
motorA.forward(motor_speed);
delay(3000);
motorA.backward(motor_speed);
delay(3000);
motorA.coast();
delay(5000);
}