Repeater
-
How do i do a repeater node? I cant found it in the code anymore?
-
@Dragon the instructions on https://www.mysensors.org/download/sensor_api_20#create-repeating-nodes should be all you need - have you seen it?
-
@mfalkvidd thanks i missed that. So i only need to write this in the code #define MY_REPEATER_FEATURE
-
@Dragon yes, and no sleeping because a sleeping node can not receive messages.
-
@mfalkvidd Thanks
-
Then I guess the following code will do just fine.
#define MY_DEBUG #define NODE_ID 7 // Set node ID here #define SKETCH_NAME "Repeater Node" #define SKETCH_VERSION "1.1" // Enable and select radio type attached #define MY_RADIO_NRF24 //#define MY_RADIO_RFM69 // Enabled repeater feature for this node #define MY_REPEATER_FEATURE #include <SPI.h> #include <MySensors.h> void setup() { } void presentation() { //Send the sensor node sketch version information to the gateway sendSketchInfo(SKETCH_NAME, SKETCH_VERSION); } void loop() { }
-
@รอเรือ I think some things are missing in that code. This is the one I'm using.
#define MY_DEBUG #define MY_NODE_ID 2 // Set node ID here, or remove for Auto #define SKETCH_NAME "Repeater Node" #define SKETCH_VERSION "2.1.1" #define CHILD_ID 1 // Enable and select radio type attached #define MY_RADIO_NRF24 //Set other radio options here if needed //#define MY_RADIO_RFM69 // Enabled repeater feature for this node #define MY_REPEATER_FEATURE #include <SPI.h> #include <MySensors.h> void presentation() { //Send the sensor node sketch version information to the gateway sendSketchInfo(SKETCH_NAME, SKETCH_VERSION); present(CHILD_ID, S_ARDUINO_REPEATER_NODE); } void loop() { }
-
thank You @manutremo