HI Paul,
Sorry i missed that, The pins are connected to a 4 12v+ Relay board.
Relay4 Board - MikroElektronika which controls 4 24v Lights.
I understand the code may not be ideal, i have torn the code up trying to diagnose the issue and i understand the code is not ideal r production ready at the moment. i am just trying to identify the issue and resolve it before i can re-code the sections ready for a production environment.