Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 4:e2d5ac8459a4, committed 2013-07-15
- Comitter:
- melse
- Date:
- Mon Jul 15 13:53:22 2013 +0000
- Parent:
- 3:ccd47cdacb7b
- Child:
- 5:179e85a68446
- Commit message:
- Lots more documentation
Changed in this revision
| SeeedStudioShieldBot.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/SeeedStudioShieldBot.h Mon Jul 15 13:48:10 2013 +0000
+++ b/SeeedStudioShieldBot.h Mon Jul 15 13:53:22 2013 +0000
@@ -9,30 +9,64 @@
SeeedStudioShieldBot();
/** Switch on the left motor at the given speed.
+ * @param speed The speed, from 0.0 to 1.0 at which to spin the motor.
*/
void left_motor(float speed);
+
+ /** Switch on the right motor at the given speed.
+ * @param speed The speed, from 0.0 to 1.0 at which to spin the motor.
+ */
void right_motor(float speed);
- // Like the two above, but both at the same speed.
- // Negative of either will do the same job as the other (hopefully...)
+ /** Switch on both motors, forwards at the given speed.
+ * @param speed The speed, from 0.0 to 1.0 at which to spin the motor.
+ */
void forward(float speed);
+
+ /** Switch on both motors, backwards at the given speed.
+ * @param speed The speed, from 0.0 to 1.0 at which to spin the motor.
+ */
void backward(float speed);
- // This will rotate both of the motors in opposite directions, at the same speed
+ /** Switch on both motors at the given speed, in opposite directions so as to turn left.
+ * @param speed The speed, from 0.0 to 1.0 at which to spin the motors.
+ */
void left(float speed);
+
+ /** Switch on both motors at the given speed, in opposite directions so as to turn right.
+ * @param speed The speed, from 0.0 to 1.0 at which to spin the motors.
+ */
void right(float speed);
+ /** Disable the left motor, by driving enable pin for the second motor low...
+ */
void disable_left_motor();
+
+ /** Disable the left motor, by driving enable pin for the first motor low...
+ */
void disable_right_motor();
+ /** Enable the left motor, by driving enable pin for the second motor high...
+ */
void enable_left_motor();
+
+ /** Enable the left motor, by driving enable pin for the first motor high...
+ */
void enable_right_motor();
+ /** Stop both motors at the same time. Different to disable.
+ */
void stopAll();
+
+ /** Stop a chosen motor.
+ * @param motor Number, either 1 or 2 choosing the motor.
+ */
void stop(int motor);
// Need to do something to do with detected line...
+ /** Gives an indication of the data given by the reflectivity sensors.
+ */
float line_position();
DigitalIn rightSensor;
Seeed Studio Shield Bot