Updated version of RenBuggy Servo that can accept instructions based on time or distance.

Dependencies:   PinDetect mbed

Fork of RenBuggyServo by Renishaw

Revision:
5:c06b90175a54
Parent:
3:01bc89d7ae8e
Child:
6:5767cb4ed8de
--- a/Car.h	Mon Mar 31 07:44:16 2014 +0000
+++ b/Car.h	Mon Mar 31 07:49:08 2014 +0000
@@ -22,7 +22,7 @@
 *                                                                              *
 * Car.h                                                                        *
 *                                                                              *
-* V1. 05/03/2014                                           Mark Jones          *
+* V1.1 31/03/2014                                           Mark Jones         *
 *******************************************************************************/
 
 #ifndef CAR_H
@@ -44,19 +44,6 @@
 // Main entry point of application.
 int main() {
     
-    const int SERVO_PWM = 1500;             // 1500 = centre.
-    const int SERVO_PWM_PERIOD = 2000;  
-    const int SERVO_PWM_RANGE = 500;        // + or - 500 microseconds.
-    const float SERVO_DEGREES_RANGE = 45.0; // + or - from centre is full right/left.
-    
-    const int MOTOR_PWM = 20000;
-    const int MOTOR_PERIOD = 20000;
-    
-    // Configure the servo and motor before use.
-    myCar.configureServo_us(SERVO_PWM, SERVO_PWM_PERIOD, 
-    SERVO_PWM_RANGE, SERVO_DEGREES_RANGE);
-    myCar.configureMotor_us(MOTOR_PWM, MOTOR_PERIOD);
-    
     // Drive the RenBuggy!
     myCar.setSpeed(20000);
     myCar.setDirection(0);