* 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:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user