receive message...
-
Hello . on led rgb controller or relay exemples,if you want receive a message from controller part of the code is that one :
void receive(const MyMessage &message) { //When receiving a V_STATUS command, switch the light between OFF //and the last received dimmer value if ( message.type == V_STATUS ) { Serial.println( "V_STATUS command received..." );My Question is ; if i have 2 diferent relay nodes or rgb controller nodes ,how this simple "if MESSAGE IS V_STATUS or V_LIGHT " define what node refers to?
i mean how to select with one i want to switch on or off?
-
imagine i have 2 diferent arduinos with relays. i will upload the same code for both, exept the node_id .
then i want turn node 1 on. gw send message "to the air" and both arduino get message saying "light on"
what i can't understand yet is ,that part of code only says ; if message is v_light turn on, For example
where is the part saying only turn relay 1 on?(differ nodes)will both relays turn on? if they have same code(exept de id)?
-
imagine i have 2 diferent arduinos with relays. i will upload the same code for both, exept the node_id .
then i want turn node 1 on. gw send message "to the air" and both arduino get message saying "light on"
what i can't understand yet is ,that part of code only says ; if message is v_light turn on, For example
where is the part saying only turn relay 1 on?(differ nodes)will both relays turn on? if they have same code(exept de id)?