Biorobotics / Mbed 2 deprecated Motor_moving_setpoint

Dependencies:   QEI mbed

Revision:
1:c855dee2c6d4
Parent:
0:70a6fd5751a6
Child:
2:f0215a034e04
diff -r 70a6fd5751a6 -r c855dee2c6d4 main.cpp
--- a/main.cpp	Mon Sep 28 09:55:41 2015 +0000
+++ b/main.cpp	Mon Sep 28 12:33:24 2015 +0000
@@ -15,11 +15,12 @@
 
 
 Ticker tellen;
-bool stoppen = false;
+volatile bool stoppen = false;
 
 void GOTO()
 {
-double resolution = 8400 / (2 * 3.14592);
+    double Offset = 10511 ;//8400 counts is aangegeven op de motor ( is te weinig) 10511 schiet iets over
+double resolution = Offset / (2 * 3.14159265);
 double Rotation = 4; // rotation in pi
 double movement = Rotation * resolution;
    
@@ -47,6 +48,7 @@
 
 
 int main()
+
 {
    int proberen = 1000;
        pc.printf("The number of rotation is %i \n",proberen);
@@ -54,9 +56,9 @@
        
    
    
-    
+    while(stoppen == false){
            tellen.attach(&GOTO, 0.1); 
-           
+           }