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)?
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login