Skip to content

Commit

Permalink
moredocs
Browse files Browse the repository at this point in the history
  • Loading branch information
maniacbug committed Jun 12, 2011
1 parent 5329633 commit 3b216f9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
8 changes: 8 additions & 0 deletions RF24Network.h
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,14 @@ class RF24Network
* the mesh to the correct node.
*/

/**
* @example sensornet.pde
*
* Example of a sensor network.
* This sketch demonstrates how to use the RF24Network library to
* manage a set of low-power sensor nodes which mostly sleep but
* awake regularly to send readings to the base.
*/
/**
* @mainpage Network Layer for RF24 Radios
*
Expand Down
9 changes: 6 additions & 3 deletions examples/sensornet/sensornet.pde
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
* Example of a sensor network
*
* This sketch demonstrates how to use the RF24Network library to
* manage a set of sensor nodes which awake regularly to send readings
* to the base.
* manage a set of low-power sensor nodes which mostly sleep but
* awake regularly to send readings to the base.
*
* To see the underlying frames being relayed, compile RF24Network with
* #define SERIAL_DEBUG.
Expand Down Expand Up @@ -64,7 +64,10 @@ uint16_t this_node;
// The message that we send is just a ulong, containing the time
unsigned long message;

// Sleep constants
// Sleep constants. In this example, the watchdog timer wakes up
// every 1s, and every 4th wakeup we power up the radio and send
// a reading. In real use, these numbers which be much higher.
// Try wdt_8s and 7 cycles for one reading per minute.
const wdt_prescalar_e wdt_prescalar = wdt_1s;
const short sleep_cycles_per_transmission = 4;

Expand Down

0 comments on commit 3b216f9

Please sign in to comment.