gpa in double prescision

Dependencies:   mbed

Revision:
2:252a61a7e8f9
Parent:
1:2e118d67eeae
Child:
3:a951d699878b
--- a/main.cpp	Wed Jan 10 16:35:44 2018 +0000
+++ b/main.cpp	Thu Mar 01 10:37:18 2018 +0000
@@ -23,7 +23,7 @@
  o. ENC CH B            ..
  ..                     ..
  ..                     ..
- .o AIN acy (PA_0)      ..  
+ .o AIN acx (PA_0)      ..  
  .o AIN acy (PA_1)      ..                  5.
  .o i_soll(PA_4)        .o Analog GND
  .o AIN Gyro (PB_0)     ..
@@ -36,8 +36,8 @@
 InterruptIn button(USER_BUTTON);        // User Button, short presses: reduce speed, long presses: increase speed
 AnalogIn ax(PA_0);                      // Analog IN (acc x) on PA_0
 AnalogIn ay(PA_1);                      // Analog IN (acc y) on PA_1
-AnalogIn gz(PB_0);                      // Analog IN (gyr z) on PB_0
-AnalogOut out(PA_4);                    // Analog OUT 1.6 V -> 0A 3.2A -> 2A (see ESCON)
+AnalogIn gz(PA_4);                      // Analog IN (gyr z) on PB_0
+AnalogOut out(PA_5);                    // Analog OUT 1.6 V -> 0A 3.2A -> 2A (see ESCON)
 float out_value = 1.6f;                 // set voltage on 1.6 V (0 A current)
 float kp = 4.0f;                        // speed control gain for motor speed cntrl.
 float Tn = 0.05f;                       // Integral time       "     "        "
@@ -109,6 +109,7 @@
     if(++k >= 199){
         k = 0;
         pc.printf("phi=%3.2f omega=%3.2f \r\n",ang*180.0f/PI,vel);
+        //pc.printf("ax=%3.2f ay=%3.2f gz=%3.2f \r\n",u2ax(3.3f*ax.read()),u2ay(3.3f*ay.read()),wz);
     }
 }
 //******************************************************************************