rampscenario
Dependencies: MODSERIAL QEI mbed
Fork of check_motoren_buttons by
Diff: main.cpp
- Revision:
- 19:9e87d4f9fbc4
- Parent:
- 18:75ced8c04eee
diff -r 75ced8c04eee -r 9e87d4f9fbc4 main.cpp --- a/main.cpp Tue Oct 18 12:07:00 2016 +0000 +++ b/main.cpp Fri Nov 04 07:37:06 2016 +0000 @@ -4,8 +4,8 @@ InterruptIn sw3(SW3); DigitalIn encoder1A(D13); DigitalIn encoder1B(D12); -DigitalIn button_cw(D9); -DigitalIn button_ccw(D8); +DigitalIn button_cw(PTC12); +DigitalIn button_ccw(D9); //DigitalOut ledcw(D10); //DigitalOut ledccw(D2); MODSERIAL pc(USBTX, USBRX); @@ -40,7 +40,7 @@ pc.printf("up \n\r"); // print lijn "up" richting_motor1 = 1; pwm_motor1 = a; - \\ ledcw=1; ledccw=0; + // ledcw=1; ledccw=0; } @@ -50,8 +50,8 @@ pc.printf("left \n\r"); // print lijn "left" richting_motor2 = 1; pwm_motor2 = b; - \\ledcw=1; - \\ledccw=1; + //ledcw=1; + //ledccw=1; } } @@ -63,7 +63,7 @@ pc.printf("down \n\r"); // print lijn "down" richting_motor1 = 0; pwm_motor1 = a; - \\ledccw=1; ledcw=0; + //ledccw=1; ledcw=0; } @@ -73,7 +73,7 @@ pc.printf("right \n\r"); // print lijn "right" richting_motor2 = 0; pwm_motor2 = b; - \\ledccw=1; ledcw=0; + //ledccw=1; ledcw=0; } } @@ -81,10 +81,9 @@ pc.printf("motor staat stil \n\r"); pwm_motor2=0; pwm_motor1=0; - \\ledccw=0; ;ledcw=0; + //ledccw=0; ;ledcw=0; } - - + } } \ No newline at end of file