Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- motors_controls library
- */
- #ifndef DRV8833_h
- #define DRV8833_h
- #include "Arduino.h"
- class DRV8833
- {
- public:
- DRV8833(int _m1_a, int _m1_b, int _m2_a, int _m2_b);
- void turn_left(int spd);
- void turn_right(int spd);
- void left_1wd(int spd);
- void right_1wd(int spd);
- void forward(int spd);
- void backward(int spd);
- void move(int motor, int speed, int direction);
- void stop();
- private:
- int m1_a;
- int m1_b;
- int m1_pwm;
- int m2_a;
- int m2_b;
- int m2_pwm;
- };
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement