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.
Diff: main.cpp
- Revision:
- 9:557b85b94a89
- Parent:
- 8:05427ba764a9
diff -r 05427ba764a9 -r 557b85b94a89 main.cpp --- 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; + } }