MySensors Library & Examples  2.3.2
RepeaterNode.ino
1 /*
2  * The MySensors Arduino library handles the wireless radio link and protocol
3  * between your home built sensors/actuators and HA controller of choice.
4  * The sensors forms a self healing radio network with optional repeaters. Each
5  * repeater and gateway builds a routing tables in EEPROM which keeps track of the
6  * network topology allowing messages to be routed to nodes.
7  *
8  * Created by Henrik Ekblad <[email protected]>
9  * Copyright (C) 2013-2019 Sensnology AB
10  * Full contributor list: https://github.com/mysensors/MySensors/graphs/contributors
11  *
12  * Documentation: http://www.mysensors.org
13  * Support Forum: http://forum.mysensors.org
14  *
15  * This program is free software; you can redistribute it and/or
16  * modify it under the terms of the GNU General Public License
17  * version 2 as published by the Free Software Foundation.
18  *
19  *******************************
20  *
21  * REVISION HISTORY
22  * Version 1.0 - Henrik Ekblad
23  *
24  * DESCRIPTION
25  * Example sketch showing how to create a node that repeats messages
26  * from nodes far from gateway back to gateway.
27  * It is important that nodes that has enabled repeater mode calls
28  * process() frequently. Repeaters should never sleep.
29  */
30 
31 // Enable debug prints to serial monitor
32 #define MY_DEBUG
33 
34 // Enable and select radio type attached
35 #define MY_RADIO_RF24
36 //#define MY_RADIO_NRF5_ESB
37 //#define MY_RADIO_RFM69
38 //#define MY_RADIO_RFM95
39 
40 // Enabled repeater feature for this node
41 #define MY_REPEATER_FEATURE
42 
43 #include <MySensors.h>
44 
45 void setup()
46 {
47 
48 }
49 
51 {
52  //Send the sensor node sketch version information to the gateway
53  sendSketchInfo("Repeater Node", "1.0");
54 }
55 
56 void loop()
57 {
58 }
59 
bool sendSketchInfo(const char *name, const char *version, const bool requestEcho=false)
API declaration for MySensors.
void setup()
Called after node initialises but before main loop.
void presentation()
Node presentation.
void loop()
Main loop.