RF24Network Send example program. Tested on Nucleo-F411.

Dependencies:   RF24 RF24Network mbed

Revision:
3:d605536db315
Parent:
2:926b93a68399
--- 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);