Met kinematics
Dependencies: MODSERIAL QEI mbed-dsp mbed
Fork of Motorcode by
Diff: main.cpp
- Revision:
- 3:40a25c2c24ba
- Parent:
- 2:52b3c0b95388
- Child:
- 4:651d06e860e7
--- a/main.cpp Wed Sep 12 10:27:38 2018 +0000 +++ b/main.cpp Wed Sep 12 11:52:10 2018 +0000 @@ -6,7 +6,7 @@ DigitalOut ledr(LED_RED); DigitalOut ledg(LED_GREEN); DigitalOut ledb(LED_BLUE); -DigitalIn sw2(PTC6); +DigitalIn sw2(PTC6); MODSERIAL pc(USBTX, USBRX); @@ -27,10 +27,41 @@ { color = 'b'; } + else if (c == NULL) + { + ledr = 1; + ledg = 1; + ledb = 1; + } else { pc.printf("Character %c is not valid \r\n",c); c = color; + + ledr = 0; + ledg = 0; + ledb = 0; + wait(0.1f); + ledr = 1; + ledg = 1; + ledb = 1; + wait(0.1f); + ledr = 0; + ledg = 0; + ledb = 0; + wait(0.1f); + ledr = 1; + ledg = 1; + ledb = 1; + wait(0.1f); + ledr = 0; + ledg = 0; + ledb = 0; + wait(0.1f); + ledr = 1; + ledg = 1; + ledb = 1; + wait(0.1f); } if (color == 'r') @@ -74,6 +105,8 @@ while (true) { c = pc.getc(); + + } }