Library for the Shield Bot by SeeedStudio

Dependents:   Seeed_Bot_Shield Seeed_BlueBot_demo Seeed_BlueBot_demo_test1 LAB03_Oppgav1 ... more

Fork of SeeedShieldBot by Components

Revision:
4:e2d5ac8459a4
Parent:
3:ccd47cdacb7b
Child:
5:179e85a68446
--- 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;