I have a Arduino 8 relay module board that I want to controle via a Arduino UNO that has installed the standardFirmata sketch.
When I test the Arduino and relay board I can control relay 1 to 6 via analog pin A0 until A5.
I use this test tool: https://www.pjrc.com/tmp/firmata/readme.html and set pin 14 until pin 19 to output. When I change the state LOW/HIGH the relay switches on and off.
In processing I define alle pins as output like so;
The problem is that only the first two defined pins react. So when I commend out pin 14 and 15. The code below only changes the state of relay on pin 16 and 17 and so on.
How do you power the relays on the relay board? If you power them from the Uno’s 5V pin, you probably are running into power limitations.
Trim your Processing sketch to e,g,
if (btnX == true) {
arduino.digitalWrite(14, Arduino.LOW); //A0
}
if (btnY == true) {
arduino.digitalWrite(14, Arduino.HIGH); //A0
}
Test (you said it works).
Change 14 to 15 and test.
Change 15 to 16 and test.
Test all pins; do they all work when controlling a single relay? If no, I do not know what the problem is; if yes, I’m sure it’s a power issue and you will need a dedicated power supply for the relays on the relay board.