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.
Dependencies: mbed RF24Network RF24
Diff: main.cpp
- Revision:
- 3:d605536db315
- Parent:
- 2:926b93a68399
- Child:
- 4:d7a0a07f21f3
--- 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);