to compare with V6, do not change.
Dependencies: mbed
Diff: Brobot.h
- Revision:
- 0:01c109e18d49
diff -r 000000000000 -r 01c109e18d49 Brobot.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Brobot.h Fri May 26 12:33:39 2017 +0000 @@ -0,0 +1,39 @@ +/* + * Brobot.h + * + */ + +#ifndef BROBOT_H_ +#define BROBOT_H_ + +#include <cstdlib> +#include <mbed.h> + +/** + * This is a device driver class to drive the robot autonomously + */ +class Brobot +{ + +public: + // constructors have same name as the class + Brobot(PwmOut* left, PwmOut* right, int number); + Brobot(); //empty constructor + + + // void init(PwmOut* left, PwmOut* right, int number); + void turnleft(); + void turnright(); + void forward(); + void back(); + void stop(); + void slow(float ammount); // ammount is subtracted from current speeds + void rotate(float ammount); // values from -0.5 to 0.5 + +private: + PwmOut* pwmL; + PwmOut* pwmR; + int number; +}; + +#endif /* BROBOT_H_ */