A000110 4 RELAYS SHIELD relay control

hi

i am having problems controlling an Arduino A000110 4 RELAYS SHIELD, when i upload the code to the Arduino Uno3 all the relays latch together on the NO & NC & Common, I have had this working before with input from 4 Honeywell SS495A Hall sensors.

I am at a loss where the error in the code is.

I have included my code for reference, the code has worked before

 int hallswitch1 = 2; //Pin for Hall switch PIN= 2
 int hallswitch2 = 3; //Pin for Hall switch PIN= 3
 int hallswitch3 = 5; //Pin for Hall switch PIN= 5
 int hallswitch4 = 6; //Pin for Hall switch PIN= 6

 int val1 = 0;       //Integer for reading Hall status  
 int val2 = 0; 
 int val3 = 0;
 int val4 = 0;

 int RELAY1 = 4;   // The socket number on the Arduino that the relay1 will go to. Socket 4
 int RELAY2 = 7;   // The socket number on the Arduino that the relay1 will go to. Socket 7
 int RELAY3 = 8;   // The socket number on the Arduino that the relay1 will go to. Socket 8
 int RELAY4 = 12;  // The socket number on the Arduino that the relay1 will go to. Socket 12

void setup()
{

  pinMode(hallswitch1, INPUT); 
  pinMode (RELAY1, OUTPUT);
  
  pinMode(hallswitch2, INPUT);
  pinMode (RELAY2, OUTPUT);
    
  pinMode(hallswitch3, INPUT);
  pinMode (RELAY3, OUTPUT);
    
  pinMode(hallswitch4, INPUT);
  pinMode (RELAY4, OUTPUT);  
  
}

void loop() {

  val1 = digitalRead(hallswitch1);               //Read Hall pin status
  val2 = digitalRead(hallswitch2);               //Read Hall pin status
  val3 = digitalRead(hallswitch3);               //Read Hall pin status
  val4 = digitalRead(hallswitch4);               //Read Hall pin status

  if (val1 == HIGH) {digitalWrite(RELAY1, LOW);}
  else {digitalWrite(RELAY1, HIGH);}
  
  if (val2 == HIGH) {digitalWrite(RELAY2, LOW);}
  else {digitalWrite(RELAY2, HIGH);}
  
  if (val3 == HIGH) {digitalWrite(RELAY3, LOW);}
  else {digitalWrite(RELAY3, HIGH);}
 
  if (val4 == HIGH) {digitalWrite(RELAY4, LOW);}
  else {digitalWrite(RELAY4, HIGH);}
  
}

Just to let anyone know, if you have similar problems with the code, it might not be the code that is at fault.

in this instance the Arduino Uno was not seeing a live or ground reference from a bank of hall sensor's as these were supplied by an external 5 Volt power supply, with the wiper from the hall sensor going to the digital inputs on the relay shield, it could see the signal at 5v, i connected the live 5v feed and earth to the external input and the circuit worked as intended.

i hope this helps someone with a similar problem.