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 1:a7a6a47d25ca, committed 2016-09-10
- Comitter:
- eduvanceIoT
- Date:
- Sat Sep 10 06:46:00 2016 +0000
- Parent:
- 0:6decc57a1464
- Commit message:
- To transmit analog sensor data, from transmitter to receiver wirelessly through NRF module and plot it on serial plotter (Receiver). ;
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Tue Aug 02 08:10:49 2016 +0000
+++ b/main.cpp Sat Sep 10 06:46:00 2016 +0000
@@ -9,9 +9,10 @@
//led for debugging purposes
DigitalOut GreenLED(LED2);
+
int main() {
- char count[1];
+ char count[2];
char RxDataCnt;
char temp;
@@ -30,7 +31,7 @@
pc.printf( "Simple 2 Byte Receiver\r\n" );
- RxDataCnt = 1;
+ RxDataCnt = 2;
//setting packet size
my_nrf24l01p.setTransferSize( RxDataCnt );
@@ -49,7 +50,7 @@
//read the data into the receive buffer
temp = my_nrf24l01p.read( NRF24L01P_PIPE_P0, count, RxDataCnt);
- pc.printf( "Receiving %d = %d\r\n",temp,count[0]);
+ pc.printf( "$%d %d;",count[0],count[1]);
//Toggle LED2 for debugging purposes
GreenLED = !GreenLED;