MySensors Library & Examples  2.3.2-36-g2e00bf6
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-2020 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 //#define MY_PJON
40 
41 // Enabled repeater feature for this node
42 #define MY_REPEATER_FEATURE
43 
44 #include <MySensors.h>
45 
46 void setup()
47 {
48 
49 }
50 
52 {
53  //Send the sensor node sketch version information to the gateway
54  sendSketchInfo("Repeater Node", "1.0");
55 }
56 
57 void loop()
58 {
59 }
60 
sendSketchInfo
bool sendSketchInfo(const char *name, const char *version, const bool requestEcho=false)
loop
void loop()
Main loop.
Definition: RepeaterNode.ino:57
presentation
void presentation()
Node presentation.
Definition: RepeaterNode.ino:51
setup
void setup()
Called after node initialises but before main loop.
Definition: RepeaterNode.ino:46
MySensors.h
API declaration for MySensors.