* Changed library to call by reference instead of using pointers. Makes code much cleaner.

* RelayNodes renamed to RepeaterNode to distiguish this from RelayActuator.
* Ack is now possible to request for all message types. Added ack-flag for some of the exposed internal messages and presentation message.
This commit is contained in:
Henrik Ekblad
2014-06-16 00:30:13 +02:00
parent 9ddf442e42
commit 90f79c97cd
15 changed files with 200 additions and 204 deletions
@@ -0,0 +1,26 @@
// Example sketch showing how to create a node thay repeates messages
// from nodes far from gateway back to gateway.
// It is important that nodes that has enabled repeater mode calls
// gw.preocess() frequently. This node should never sleep.
#include <MySensor.h>
#include <SPI.h>
#include <RF24.h>
MySensor gw;
void setup()
{
// The third argument enables repeater mode.
gw.begin(NULL, AUTO, true);
//Send the sensor node sketch version information to the gateway
gw.sendSketchInfo("Repeater Node", "1.0");
}
void loop()
{
// By calling process() you route messages in the background
gw.process();
}