Floor Couwenberg
/
motor_control
proberen motor
Revision 1:e415c6eda278, committed 2016-09-29
- Comitter:
- FloorC
- Date:
- Thu Sep 29 13:29:18 2016 +0000
- Parent:
- 0:8ed7e7bbc391
- Commit message:
- proberen motor;
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/QEI.lib Thu Sep 29 13:29:18 2016 +0000 @@ -0,0 +1,1 @@ +http://developer.mbed.org/users/aberk/code/QEI/#5c2ad81551aa
--- a/main.cpp Mon Sep 26 13:40:12 2016 +0000 +++ b/main.cpp Thu Sep 29 13:29:18 2016 +0000 @@ -1,30 +1,20 @@ #include "mbed.h" -DigitalIn switch2(SW2); -DititalIn switch3(SW3); -DigitalOut groen(LED_GREEN); -DigitalOut rood(LED_RED); +DigitalOut motor(D4); +PwmOut pwm_motor(D5); +//DigitalIn switch3(SW3); + Serial pc(USBTX, USBRX); -int main() +int CW = 0; +int CCW = 1; + +int main () { - groen = 1; - rood = 1; - while (true){ - - if (SW2 == 0){ - groen = 0; - rood = 1; - } - else if (SW3 == 0){ - groen = 1; - rood = 0; - } - else{ - groen = 1; - rood = 1; - } - } -} - \ No newline at end of file + motor = CW; + pwm_motor = 0.5; + + +} +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Thu Sep 29 13:29:18 2016 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/2e9cc70d1897 \ No newline at end of file