
02/07/15
Dependencies: mbed
Revision 65:08b3eb9b95dd, committed 2015-08-05
- Comitter:
- aidanPJG
- Date:
- Wed Aug 05 09:02:17 2015 +0000
- Parent:
- 64:809bd19f4e7c
- Child:
- 66:b642dac6f65d
- Commit message:
- fixed handshake so program can continue after first iteration
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Wed Aug 05 08:44:12 2015 +0000 +++ b/main.cpp Wed Aug 05 09:02:17 2015 +0000 @@ -8,16 +8,20 @@ Serial pc(USBTX, USBRX); // tx, rx DigitalOut led1(LED1); DigitalOut led2(LED2); -void handshake(); +string handshake(); void run(); int main(void) { initialise(3); //used to create the Datalog file should happen once for every bend test - handshake(); - pc.printf("hello2"); + if (handshake() == "success") + { + run(); + } + pc.printf("main after"); //it works now!!!!!!!!!!!!!!! + led2= 1; } -void handshake() +string handshake() { unsigned char input; pc.printf("a\n"); @@ -28,7 +32,7 @@ if (input == 'a') { led1 = 1; - run(); + return "success" ;// run(); } } }