can 2 x 5v relays and 2 arduinos be connected together

hi i am wondering if i can connect these together one uno with 5v relay to turn on/off water and one nodemcu with 5v relay for switching lights on/off by phone /alexa ,the water is on timed sketch but would like to override sometimes with alexa so both relays would be linked together is this possible,im thinking the uno would be merrily working away untill alexa turns it on /off later in the day ,im using 2 seperate arduinos as having trouble merging the sketches together regards colin

Maybe you should solve the merging problem that you have ;)

so both relays would be linked together

So when you switch the lights on, you also switch the water on? I think that you need to give a better description.

Note: I'm not familiar with nodemcu and I'm not familiar with alexa.

Both relays would work independant of each other the uno to work the water but the WiFi nodemcu WiFi would work the lights and override the water Colin

Hi Thankyou for that it was my understanding that maybe it would I am doing this way because the nodemcu is the only one I can get working good with Alexa tried the d1r2 as different boards and none of them worked the same as the nodemcu all connect to WiFi but nothing else thought they were basically same board esp8266 chip many thanks Colin

I guess you should be able to send a different command from alexa to the nodemcu? E.g. “override water”. How do you visualise the communication between Arduino and nodemcu?

But as said, you should try to fix your merging problem :wink:

Hi I've worked on merging for past 2 weeks and no luck at present I get 3/4 of them merged and errors come up which I can not find answers for but will continue with it I am using Ono fo r now with relay to start water on twice a day and same sketch to turn on lights once a day on another relay the nodemcu will turn on with Alexa when I want to override the lights and maybe a motion sensor aswell have tried wemos d1r2 for this although connects to WiFi will not work with Alexa Regards colin

It will help if you use punctuation ;) Maybe I can find a proper description in there ;) Try again if you need more help.

For the merging problem, I suggest that you start a new thread providing both codes as well as the merged code when it fails to compile.

sterretje: It will help if you use punctuation ;) Maybe I can find a proper description in there ;) Try again if you need more help.

For the merging problem, I suggest that you start a new thread providing both codes as well as the merged code when it fails to compile.

You beat me to it. It is agonizingly difficult to understand a 478 character sentence with no structure.

OP- look at using Node Red. I have 65 nodes in my home on various processors including Wemos D1, NodeMcu, Raspberry Pi's, and unknown processors inside appliances. I have Echo devices in every room of the house and control everything through Alexa in any room. With Node-Red you can control independent processors any way you like.

Without your code, we are only guessing.

hi thanks for all the info ,i tried to upload code but said file was too long is there any other way to post code colin

Why do you now want to postcode Colin? Is he lost?

If code is too big, you can attach it.

From your description till now, it should not be a massive code.

But anyway. start a new thread for the merging issue.