Updated version of RenBuggy Servo that can accept instructions based on time or distance.
Fork of RenBuggyServo by
Diff: Car.h
- Revision:
- 7:566d6deaceac
- Parent:
- 6:5767cb4ed8de
diff -r 5767cb4ed8de -r 566d6deaceac Car.h --- a/Car.h Mon Mar 31 12:54:28 2014 +0000 +++ b/Car.h Wed Apr 02 12:47:01 2014 +0000 @@ -129,8 +129,16 @@ /** * Moves the car in the direction it is facing, until a user * tells it to stop. + * @param Time is the time in seconds during which it will drive forwards, then stop. */ - void forwards_timed(); + void forwards_timed(float Time); + + /** + * Moves the car in the direction it is facing, for a specified + * distance. + * @param distance is how far the car will travel, in cm. + */ + void forwards(float distance); /** * Stops the car from moving.