first publish

Dependencies:   MPU9150_DMP MotorControl QuaternionMath SimpleIOMacros mbed

Fork of cool_step_new by Cool-step

Files at this revision

API Documentation at this revision

Comitter:
heuristics
Date:
Tue Jun 02 06:51:34 2015 +0000
Parent:
23:b79faf58d4a1
Child:
25:af166a728c89
Commit message:
3465

Changed in this revision

MotorControl.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/MotorControl.lib	Mon Jun 01 06:06:28 2015 +0000
+++ b/MotorControl.lib	Tue Jun 02 06:51:34 2015 +0000
@@ -1,1 +1,1 @@
-http://developer.mbed.org/teams/Cool-step/code/MotorControl/#d950f0c95da1
+http://developer.mbed.org/teams/Cool-step/code/MotorControl/#008c5de8a213
--- a/main.cpp	Mon Jun 01 06:06:28 2015 +0000
+++ b/main.cpp	Tue Jun 02 06:51:34 2015 +0000
@@ -53,9 +53,11 @@
 void swaveTask(void)
 {
     if(squarewave) {
-        motor2.setAngle(0);
+        motor1.setAngle(5);
+        motor2.setAngle(5);
     } else {
-        motor2.setAngle(60);
+        motor1.setAngle(55);
+        motor2.setAngle(55);
     }
     squarewave=!squarewave;
 }
@@ -116,7 +118,6 @@
     //initialize_connection();
     infoTicker.attach(infoTask,0.2f);
    // commandTicker.attach(getCommand,0.2f);
-    swaveTicker.attach(swaveTask,1.0f);
     if(imu.isReady()) {
         debug.printf("MPU9150 is ready\r\n");
     } else {
@@ -133,12 +134,17 @@
     imu.setDMPEnabled(true);
 
     Quaternion q1;
-    wait_ms(500);
+    motor1.setAngle(-60);
+
+    motor2.setAngle(-60);
+    wait_ms(1000);
     motor1.setAngle(0);
 
     motor2.setAngle(0);
+    wait_ms(100);
     initCaptures();
 
+    swaveTicker.attach(swaveTask,.20f);
 
     while(1) {
         if(imu.getFifoCount() >= 48) {