The aim of my project is to control a number of lights from the GPIO pins of the Arduino. For that I am using relay modules (src-05vdc-sl-c), each module having 8 relays. Each of the relays is connected to the GPIO pins on the Arduino.
Since I needed to control more than 70 lights, I had to use 2 arduino mega 2560. I uploaded the code in each of the Arduino megas and everything was working fine.
I first worked on 1 arduino and after ensuring that this whole thing is working fine, I bought another Arduino mega 2560 and uploaded the code and connected the relay modules to Arduino and the lights to the relays.
For the GUI, I used qt creator. Everytime I press a button on the GUI, it sends “<on, pinNumber,0>” to turn on the light. Since the relays are turned on when low is sent to them. And to turn the pins off “<off, pinNumber,1>” .
The computer that is used to communicate with the computers is brand new and doesn’t have anything installed on it. Just the qt and Arduino IDE.
54 lights are connected to the first Arduino (let’s call it A) and 12 lights are connected to the second one (lets name it B).
Now, the problem is even if both the arduinos are connected to the computer and the device manager and Arduino IDE detect the COM3 (Arduino A) and COM4 (Arduino B) ports, but when I press the buttons for the lights connected to A, the lights don’t turn on and there is no light on the Arduino that tells us if there is a data transfer on serial port.
But when I press buttons of lights connected to B, the lights on Arduino flash indicating a data transfer and the lights connected to B turn on.
Now I am not sure if there is some problem with the Arduino or what… The whole thing was running successfully for 2 weeks and I encountered the problem today in the morning.