Samenwerking Groep 12
Dependencies: Encoder MODSERIAL HIDScope mbed
Foo
Diff: main.cpp
- Revision:
- 5:14f6189d86a2
- Parent:
- 4:a92d354265b2
- Child:
- 6:e743bf8b9a59
--- a/main.cpp Mon Sep 21 11:14:11 2015 +0000 +++ b/main.cpp Mon Sep 21 11:20:14 2015 +0000 @@ -7,17 +7,17 @@ DigitalOut motor2direction(D4); //D4 en D5 zijn motor 2 (op het motorshield) PwmOut motor2speed(D5); DigitalIn button(PTA4); -Encoder motor2(D13,D12,true); -MODSERIAL pc(USBTX,USBRX); +Encoder motor2(D13,D12); +//MODSERIAL pc(USBTX,USBRX); int main() { - pc.baud(9600); + //pc.baud(9600); while(true) { if (button.read() < 0.5) { //if button pressed motor2direction = 1; - motor2speed = 0.3f; + motor2speed = 0.5f; //pc.printf("positie = %d \n", motor2.getPosition()); } else { // If button is not pressed motor2direction = 0;