Daniqe Kottelenberg / Mbed 2 deprecated check_motoren_buttons

Dependencies:   MODSERIAL QEI mbed

Fork of check_motoren_buttons_emg by Daniqe Kottelenberg

Files at this revision

API Documentation at this revision

Comitter:
sivuu
Date:
Fri Sep 30 11:29:25 2016 +0000
Parent:
7:9dc08a9a5991
Child:
10:06d0fe6b3bcf
Commit message:
met de meest optimale wait van 0.3 seconde. dit zorgt ervoor dat de hapering weg is maar zorgt ook voor een vertraging van de motoren.

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Fri Sep 30 09:56:19 2016 +0000
+++ b/main.cpp	Fri Sep 30 11:29:25 2016 +0000
@@ -1,8 +1,8 @@
 #include "mbed.h"
 //#include "MODSERIAL.h"
  
-DigitalOut led(LED_RED);
-DigitalOut led2(LED_BLUE);
+//DigitalOut led(LED_RED);
+//DigitalOut led2(LED_BLUE);
 InterruptIn sw3(SW3);
 Serial pc(USBTX, USBRX);
 DigitalOut motor1(D4);
@@ -33,7 +33,7 @@
            pc.printf("up \n\r");        // print lijn "up"   
            motor1 = 1;
            pwm_motor1 = 1;     
-           wait (0.05);
+           wait (0.03);
            pwm_motor1 = 0;
          } 
          
@@ -43,7 +43,7 @@
            pc.printf("left \n\r");      // print lijn "left"
            motor2 = 1;
            pwm_motor2 = 1;
-          wait (0.05);
+          wait (0.03);
           pwm_motor2 = 0;  
          }      
               
@@ -56,7 +56,7 @@
            pc.printf("down \n\r");      // print lijn "down"   
            motor1 = 0;
            pwm_motor1 = 1;
-           wait (0.05);
+           wait (0.03);
            pwm_motor1 = 0;
          } 
          
@@ -66,7 +66,7 @@
            pc.printf("right \n\r");    // print lijn "right"
            motor2 = 0;
            pwm_motor2 = 1;
-           wait (0.05); 
+           wait (0.03); 
            pwm_motor2=0;
          }