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 3:9166a6a2caf3, committed 2019-01-18
- Comitter:
- pratik_sheth_
- Date:
- Fri Jan 18 20:19:38 2019 +0000
- Parent:
- 2:9f401852272c
- Commit message:
- RX
Changed in this revision
| Receiver.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 9f401852272c -r 9166a6a2caf3 Receiver.cpp
--- a/Receiver.cpp Mon Jun 01 05:15:30 2015 +0000
+++ b/Receiver.cpp Fri Jan 18 20:19:38 2019 +0000
@@ -14,7 +14,7 @@
char temp;
my_nrf24l01p.powerUp();
- my_nrf24l01p.setRfFrequency(2410);
+ my_nrf24l01p.setRfFrequency(2450);
// Display the (default) setup of the nRF24L01+ chip
pc.printf( "nRF24L01+ Frequency : %d MHz\r\n", my_nrf24l01p.getRfFrequency() );
@@ -28,16 +28,16 @@
RxDataCnt = 2;
my_nrf24l01p.setTransferSize( RxDataCnt );
- my_nrf24l01p.setReceiveMode();
- my_nrf24l01p.enable();
+ my_nrf24l01p.setReceiveMode(); //setting receive mode
+ my_nrf24l01p.enable(); // enables reception
while (1) {
// If we've received anything in the nRF24L01+...
- if ( my_nrf24l01p.readable() ) {
+ if ( my_nrf24l01p.readable() ) { //count of data is given so that hw much data is stored in he buffer
// ...read the data into the receive buffer
- temp = my_nrf24l01p.read( NRF24L01P_PIPE_P0, count, RxDataCnt );
+ temp = my_nrf24l01p.read( NRF24L01P_PIPE_P0, count, RxDataCnt ); //copy 2 bytes frm receive buffer on count
pc.printf( "Cnt %d = %d %d\r\n",temp,count[0],count[1]);