encoder verwerkt
Dependencies: MODSERIAL QEI mbed
Fork of motor_control by
main.cpp
- Committer:
- FloorC
- Date:
- 2016-09-26
- Revision:
- 0:8ed7e7bbc391
- Child:
- 1:e415c6eda278
File content as of revision 0:8ed7e7bbc391:
#include "mbed.h" DigitalIn switch2(SW2); DititalIn switch3(SW3); DigitalOut groen(LED_GREEN); DigitalOut rood(LED_RED); Serial pc(USBTX, USBRX); 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; } } }