Implemented a sensor node that could sense data from any connected sensor and transmit it over an Ethernet interface to a thingspeak.com

Dependencies:   mbed nRF24L01P

Revision:
3:9166a6a2caf3
Parent:
2:9f401852272c
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]);