RF24Network Send example program. Tested on Nucleo-F411.

Dependencies:   RF24 RF24Network mbed

Files at this revision

API Documentation at this revision

Comitter:
akashvibhute
Date:
Thu Nov 05 05:59:18 2015 +0000
Parent:
2:926b93a68399
Commit message:
updated with new rf24 library Nov/05/2015

Changed in this revision

RF24.lib Show annotated file Show diff for this revision Revisions of this file
RF24Network.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
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r 926b93a68399 -r d605536db315 RF24.lib
--- a/RF24.lib	Mon Jul 06 05:24:49 2015 +0000
+++ b/RF24.lib	Thu Nov 05 05:59:18 2015 +0000
@@ -1,1 +1,1 @@
-http://developer.mbed.org/users/akashvibhute/code/RF24/#00706a42491e
+http://developer.mbed.org/users/akashvibhute/code/RF24/#e94be00fd19e
diff -r 926b93a68399 -r d605536db315 RF24Network.lib
--- a/RF24Network.lib	Mon Jul 06 05:24:49 2015 +0000
+++ b/RF24Network.lib	Thu Nov 05 05:59:18 2015 +0000
@@ -1,1 +1,1 @@
-http://developer.mbed.org/users/akashvibhute/code/RF24Network/#caf146ffe8b0
+http://developer.mbed.org/users/akashvibhute/code/RF24Network/#dfc8da7ac18c
diff -r 926b93a68399 -r d605536db315 main.cpp
--- a/main.cpp	Mon Jul 06 05:24:49 2015 +0000
+++ b/main.cpp	Thu Nov 05 05:59:18 2015 +0000
@@ -10,19 +10,19 @@
 #define spi_MOSI    D4
 #define spi_MISO    D5
 
-RF24 radio(spi_MOSI, spi_MISO, spi_SCK, nrf_CSN, nrf_CE);
+RF24 radio(spi_MOSI, spi_MISO, spi_SCK, nrf_CE, nrf_CSN );
 
 // Network uses that radio
 RF24Network network(radio);
 
 // Address of our node
-const uint16_t this_node = 0;
+const uint16_t this_node = 01;
 
 // Address of the other node
-const uint16_t other_node = 1;
+const uint16_t other_node = 00;
 
 // How often to send payload packet to the other unit
-const unsigned long interval = 1000; //ms
+const unsigned long interval = 100; //ms
 
 // When did we last send?
 unsigned long last_sent;
@@ -37,8 +37,6 @@
 {
     unsigned long ms;
     unsigned long counter;
-
-    float vector_4d[4];
 };
 
 
@@ -68,10 +66,6 @@
             payload_t payload_tx;
             payload_tx.ms = t_packet.read_ms();
             payload_tx.counter = packets_sent++;
-            for(int i=0; i<=3; i++) 
-            {
-                payload_tx.vector_4d[i] = i + 1.00f;
-            }
 
 
             RF24NetworkHeader header_tx(/*to node*/ other_node);
diff -r 926b93a68399 -r d605536db315 mbed.bld
--- a/mbed.bld	Mon Jul 06 05:24:49 2015 +0000
+++ b/mbed.bld	Thu Nov 05 05:59:18 2015 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/mbed/builds/7cff1c4259d7
\ No newline at end of file
+http://mbed.org/users/mbed_official/code/mbed/builds/9296ab0bfc11
\ No newline at end of file