Sophia, an autonomous robot based on Tamiya kits
Sophia.h
- Committer:
- cylax
- Date:
- 2013-05-09
- Revision:
- 0:db79273ace80
- Child:
- 1:575431135236
File content as of revision 0:db79273ace80:
#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