
This is an example program that shows how to use the RadioHeadLite library, and does it using threads.
Dependencies: RadioHeadLite
Revision 4:8fbdf64301c5, committed 2021-06-10
- Comitter:
- rlanders73
- Date:
- Thu Jun 10 16:26:02 2021 +0000
- Parent:
- 3:fd3a7f10eed3
- Child:
- 5:75659bdf6605
- Commit message:
- updating to the latest RH lib;
Changed in this revision
RadioHeadLite.lib | Show annotated file Show diff for this revision Revisions of this file |
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/RadioHeadLite.lib Mon May 31 02:59:41 2021 +0000 +++ b/RadioHeadLite.lib Thu Jun 10 16:26:02 2021 +0000 @@ -1,1 +1,1 @@ -https://os.mbed.com/teams/PointLabs/code/RadioHeadLite/#6ffa8c82a713 +https://os.mbed.com/teams/PointLabs/code/RadioHeadLite/#9166705eb726
--- a/main.cpp Mon May 31 02:59:41 2021 +0000 +++ b/main.cpp Thu Jun 10 16:26:02 2021 +0000 @@ -88,7 +88,8 @@ // Send data if newline is found if(inbuf[len - 1] == '\n'){ - inbuf[len++] = 0; // make sure we terminate the string + len -= 2; // strip off the newline stuff +// inbuf[len++] = 0; // make sure we terminate the string radio.send(inbuf,len); radio.waitPacketSent(); len = 0; @@ -105,8 +106,9 @@ { if(radio.available()){ if(radio.recv(rxBuf,&size)) - printf("Got: %s\n", rxBuf); -// USB.send(rxBuf, size); +// printf("Got: %s\n", rxBuf); + USB.send(rxBuf, size); + USB.putc('\n'); // put a new line in just in case } } }