first commit

Dependencies:   mbed MMA8451Q

Revision:
14:eb9c58c0f8cd
Parent:
13:0091da3021df
Child:
17:d2c98ebda90b
--- a/main.cpp	Tue Oct 26 14:07:48 2021 +0000
+++ b/main.cpp	Tue Oct 26 16:33:42 2021 +0000
@@ -32,13 +32,13 @@
     servo_motor_pwm.period(1/SERVO_MOTOR_FREQ);
     motorLeft.period(1/freq);
     motorRight.period(1/freq);
-    controlUpdate.attach(&PID, TI);
+    //controlUpdate.attach(&PID, TI);
     //Center the servo motor
-    //servo_motor_pwm.write(CENTER_DUTY_CYCLE);
+    servo_motor_pwm.write(CENTER_DUTY_CYCLE);
     //controlUpdate.attach(&PID, TI);
     //Start the control systm using a Ticker object
-     // steering_control_ticker.attach(&steering_control, TI);
-     // motorLoop.attach(&PI,TI);
+      steering_control_ticker.attach(&steering_control, 0.02);
+      motorLoop.attach(&PI,TI);
   //    fault_detector.attach(&fault_check, 0.02);
       //bt.attach(&btReceive);