Advertisement
hoahoctro

DRV8833.h

Mar 24th, 2020
697
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.51 KB | None | 0 0
  1. /*
  2.   motors_controls library
  3. */
  4. #ifndef DRV8833_h
  5. #define DRV8833_h
  6.  
  7. #include "Arduino.h"
  8. class DRV8833
  9. {
  10.     public:
  11.         DRV8833(int _m1_a, int _m1_b, int _m2_a, int _m2_b);
  12.         void turn_left(int spd);
  13.         void turn_right(int spd);
  14.         void left_1wd(int spd);
  15.         void right_1wd(int spd);
  16.         void forward(int spd);
  17.         void backward(int spd);
  18.         void move(int motor, int speed, int direction);
  19.         void stop();
  20.     private:
  21.         int m1_a;
  22.         int m1_b;
  23.         int m1_pwm;
  24.         int m2_a;
  25.         int m2_b;
  26.         int m2_pwm;
  27. };
  28.  
  29. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement