Copy off node 1 to behave node 2
Dependencies: mbed RF24Network RF24
Diff: main.cpp
- Revision:
- 3:d605536db315
- Parent:
- 2:926b93a68399
- Child:
- 4:c6de6d47c54a
--- 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);