![](/media/cache/profiles/004acbc8eefec9fe0629b15f52b94bcf.50x50_q85.jpg)
Peter's version
Fork of ScoreCount by
Diff: reciever.cpp
- Revision:
- 6:e269f6c282bc
- Parent:
- 5:a50e02fc49cd
diff -r a50e02fc49cd -r e269f6c282bc reciever.cpp --- a/reciever.cpp Thu May 02 21:18:42 2013 +0000 +++ b/reciever.cpp Fri May 03 12:07:30 2013 +0000 @@ -1,4 +1,4 @@ -#include "mbed.h" + #include "mbed.h" char string[64]; int p; @@ -6,6 +6,7 @@ int Interrogate() { +Serial pc(USBTX,USBRX); Serial myserial(PTC4,PTC3); myserial.baud(1200); DigitalOut blueled(LED1); @@ -21,7 +22,7 @@ { blueled=0; myserial.scanf("%s",string); - + pc.printf("\n\r%s", string); if((strstr (string,"011")) != NULL) { p = 1; @@ -41,7 +42,8 @@ for(int f=0;f<5;f++) { blueled=!blueled; - wait(0.2); + wait(0.2); + pc.printf("\n\r%d", p); return p; } }