Jesse Kaiser
/
PresetsM9
Stoer
Revision 12:88e104000279, committed 2014-10-13
- Comitter:
- jessekaiser
- Date:
- Mon Oct 13 08:19:53 2014 +0000
- Parent:
- 11:e7cda53f4f11
- Commit message:
- Presets af, biatch;
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r e7cda53f4f11 -r 88e104000279 main.cpp --- a/main.cpp Sun Oct 12 22:16:50 2014 +0000 +++ b/main.cpp Mon Oct 13 08:19:53 2014 +0000 @@ -26,7 +26,7 @@ } } while(c != '1'); //c = pc.getc(); - while((c == '1')) { + while((c == '1')) { //Wanneer er op 1 wordt gedrukt gaat het lampje rood knipperen c = '0'; myled1 = 1; myled2 = 1; @@ -45,8 +45,9 @@ myled3 = 1; wait(1); - if (pc.readable()) { + if (pc.readable()) { //Wanneer er binnen de vastgestelde tijd weer op 1 wordt gedrukt, gaat het lampje blauw knipperen, anders reset. c = pc.getc(); + c = '0'; myled1 = 1; myled2 = 1; myled3 = 1; @@ -62,7 +63,9 @@ myled1 = 1; myled2 = 1; myled3 = 0; - wait(1); + wait(1);} + else if (c != '1') { + break; } if(pc.readable()) { c = pc.getc(); @@ -75,4 +78,3 @@ } } } -} \ No newline at end of file