Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Revision 0:a7e7666c7a9d, committed 2020-01-10
- Comitter:
- MaxenceGalopin
- Date:
- Fri Jan 10 07:44:10 2020 +0000
- Commit message:
- ok
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
mbed.bld | Show annotated file Show diff for this revision Revisions of this file |
diff -r 000000000000 -r a7e7666c7a9d main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Fri Jan 10 07:44:10 2020 +0000 @@ -0,0 +1,42 @@ +#include "mbed.h" + +#define TX PA_2 +#define RX PA_3 +Serial pc(USBTX, USBRX); + +Serial bluetooth(TX,RX); + +DigitalOut LEDA(PB_8,0); +DigitalOut LEDB(PB_9,0); + + + +int main() +{ + + char Buffer[10]; + + + + + while(1) { + bluetooth.scanf("%s",&Buffer); + pc.printf("Test"); + if(Buffer[0] == 'O' && Buffer[1] =='N') { + if(Buffer[2]=='A') { + LEDA=1; + pc.printf("nothing received"); + } else if(Buffer[2] == 'B') { + LEDB =1; + } + } else if(Buffer[0] =='O' && Buffer[1] =='F' && Buffer[2] == 'F') { + if(Buffer[3]=='A') { + LEDA=0; + } else if(Buffer[3]=='B') { + LEDB =0; + } + } else { + pc.printf("nothing received"); + } + } +}
diff -r 000000000000 -r a7e7666c7a9d mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Fri Jan 10 07:44:10 2020 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400 \ No newline at end of file