cuboid strong

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
altb
Date:
Thu Mar 01 10:33:19 2018 +0000
Parent:
1:2e118d67eeae
Commit message:
Cuboid with lift up and down

Changed in this revision

LinearCharacteristics.h 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
diff -r 2e118d67eeae -r 38d9d1c3c85f LinearCharacteristics.h
--- a/LinearCharacteristics.h	Wed Jan 10 16:35:44 2018 +0000
+++ b/LinearCharacteristics.h	Thu Mar 01 10:33:19 2018 +0000
@@ -8,7 +8,6 @@
          }
         virtual     ~LinearCharacteristics();
         float       eval(float);
-        operator float();
     
     private:
     
diff -r 2e118d67eeae -r 38d9d1c3c85f main.cpp
--- a/main.cpp	Wed Jan 10 16:35:44 2018 +0000
+++ b/main.cpp	Thu Mar 01 10:33:19 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);
     }
 }
 //******************************************************************************