Sophia, an autonomous robot based on Tamiya kits
Diff: Sophia.h
- Revision:
- 0:db79273ace80
- Child:
- 1:575431135236
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Sophia.h Thu May 09 02:45:44 2013 +0000 @@ -0,0 +1,25 @@ +#ifndef MBED_SOPHIA_H +#define MBED_SOPHIA_H + +#include "mbed.h" +#define FWD 1 +#define REV 0 +#define LEFT 0 +#define RIGHT 1 + +/** Interface to control a Sophia robot + * + */ +class Sophia { +public: + /** Set the speed of the motor + * + * @param speed The speed of the motor as a normalised value between -1.0 and 1.0 + * @param direction The desired direction to move the robot, FWD, REV, LEFT and RIGHT. + */ + void move(float speed, int direction); // direction = 0:left, 1:right + void turn(float speed, int direction); // direction = 0:left, 1:right + void spin(float speed, int direction); // direction = 0:left, 1:right +}; + +#endif \ No newline at end of file