Practical Robotics Modular Robot Library
Diff: motors.h
- Revision:
- 0:8a2dd255c508
- Child:
- 1:a6728adaf7e7
diff -r 000000000000 -r 8a2dd255c508 motors.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/motors.h Sat Nov 26 17:28:53 2016 +0000 @@ -0,0 +1,31 @@ +#ifndef MOTORS_H +#define MOTORS_H + +class Motors +{ +public: + /** + * Setup the PWM based H-Bridge drivers for the motors + */ + void init(void); + + + + void sleep(void); + void wake_up(void); + void coast_left(void); + void brake_left(void); + void set_left_motor_speed(float speed); + void coast_right(void); + void brake_right(void); + void coast(void); + void brake(void); + void set_right_motor_speed(float speed); + float get_current_left(void); + float get_current_right(void); + float get_adjusted_speed(float speed_in); + + +}; + +#endif \ No newline at end of file