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.
Revision 9:557b85b94a89, committed 2020-12-11
- Comitter:
- louisroyer
- Date:
- Fri Dec 11 09:30:05 2020 +0000
- Parent:
- 8:05427ba764a9
- Commit message:
- ;
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Fri Dec 11 09:07:00 2020 +0000 +++ b/main.cpp Fri Dec 11 09:30:05 2020 +0000 @@ -59,9 +59,7 @@ my_nrf24l01p.enable(); - char* data = "Hello PC !\r\n"; - int dataSize = strlen(data) + 1; - int i = 0; + while (1) { @@ -69,8 +67,9 @@ if ( pc.readable() ) { // ...add it to the transmit buffer + txData[txDataCnt++] = pc.getc(); - + pc.putc(txData[txDataCnt]); // If the transmit buffer is full @@ -80,9 +79,10 @@ my_nrf24l01p.write( NRF24L01P_PIPE_P0, txData, txDataCnt ); txDataCnt = 0; + myled1 = !myled1; } } // Toggle LED1 (to help debug Host -> nRF24L01+ communication) - myled1 = !myled1; + } }