Ultra sonic sensor switch leds on at given distance

Hi all,

Been messing with arduino stuff now and i have setup code for switching leds on and off at a given distance.

As soon as i try to get more that one to switch on a xx distance it knocks it all out and no pulses are even sent to the ultrasonic sensors. see code attatched

const int LED1 = 10;
const int LED2 = 11;
const int LED3 = 12;
const int LED4 = 13;
const int TRIGGER1 = 2;
const int TRIGGER2 = 3;
const int TRIGGER3 = 4;
const int TRIGGER4 = 5;
const int ECHO1 = 6;
const int ECHO2 = 7;
const int ECHO3 = 8;
const int ECHO4 = 5;
long duration, cm;

void setup() {
//
pinMode(ECHO1, INPUT);
pinMode(ECHO2, INPUT);
pinMode(ECHO3, INPUT);
pinMode(ECHO4, INPUT);
pinMode(TRIGGER1, OUTPUT);
pinMode(TRIGGER2, OUTPUT);
pinMode(TRIGGER3, OUTPUT);
pinMode(TRIGGER4, OUTPUT);
pinMode(LED1, OUTPUT);
pinMode(LED2, OUTPUT);
pinMode(LED3, OUTPUT);
pinMode(LED4, OUTPUT);
}

void loop() {

// The PING))) is triggered by a HIGH pulse of 2 or more microseconds.
// Give a short LOW pulse beforehand to ensure a clean HIGH pulse:

digitalWrite(TRIGGER4, LOW);
digitalWrite(TRIGGER2, LOW);
digitalWrite(TRIGGER3, LOW);
digitalWrite(TRIGGER1, LOW);
delayMicroseconds(2);
digitalWrite(TRIGGER4, HIGH);
digitalWrite(TRIGGER2, HIGH);
digitalWrite(TRIGGER3, HIGH);
digitalWrite(TRIGGER1, HIGH);
delayMicroseconds(5);
digitalWrite(TRIGGER4, LOW);
digitalWrite(TRIGGER2, LOW);
digitalWrite(TRIGGER3, LOW);
digitalWrite(TRIGGER1, LOW);

duration = pulseIn(ECHO1, HIGH);
if ((cm > 10) && (cm < 40))
{
digitalWrite(LED1, HIGH);
}
else
{
digitalWrite(LED1, LOW);
}

as soon as i double up on duration x x x then nothing works, i can get all sensors working one at a time by only have one duration section, If i add another duration section this is when it stops working! Is there an & or something between durations i need to add

see qoute again for code that knocks everything out

const int LED1 = 10;
const int LED2 = 11;
const int LED3 = 12;
const int LED4 = 13;
const int TRIGGER1 = 2;
const int TRIGGER2 = 3;
const int TRIGGER3 = 4;
const int TRIGGER4 = 5;
const int ECHO1 = 6;
const int ECHO2 = 7;
const int ECHO3 = 8;
const int ECHO4 = 5;
long duration, cm;

void setup() {
//
pinMode(ECHO1, INPUT);
pinMode(ECHO2, INPUT);
pinMode(ECHO3, INPUT);
pinMode(ECHO4, INPUT);
pinMode(TRIGGER1, OUTPUT);
pinMode(TRIGGER2, OUTPUT);
pinMode(TRIGGER3, OUTPUT);
pinMode(TRIGGER4, OUTPUT);
pinMode(LED1, OUTPUT);
pinMode(LED2, OUTPUT);
pinMode(LED3, OUTPUT);
pinMode(LED4, OUTPUT);
}

void loop() {

// The PING))) is triggered by a HIGH pulse of 2 or more microseconds.
// Give a short LOW pulse beforehand to ensure a clean HIGH pulse:

digitalWrite(TRIGGER4, LOW);
digitalWrite(TRIGGER2, LOW);
digitalWrite(TRIGGER3, LOW);
digitalWrite(TRIGGER1, LOW);
delayMicroseconds(2);
digitalWrite(TRIGGER4, HIGH);
digitalWrite(TRIGGER2, HIGH);
digitalWrite(TRIGGER3, HIGH);
digitalWrite(TRIGGER1, HIGH);
delayMicroseconds(5);
digitalWrite(TRIGGER4, LOW);
digitalWrite(TRIGGER2, LOW);
digitalWrite(TRIGGER3, LOW);
digitalWrite(TRIGGER1, LOW);

duration = pulseIn(ECHO1, HIGH);
if ((cm > 10) && (cm < 40))
{
digitalWrite(LED1, HIGH);
}
else
{
digitalWrite(LED1, LOW);
}

duration = pulseIn(ECHO2, HIGH);
if ((cm > 10) && (cm < 40))
{
digitalWrite(LED2, HIGH);
}
else
{
digitalWrite(LED2, LOW);
}

Any help will be appreciated!

Thank you

Dan

For those of you who are interested I made a PCB design, all be it with mistakes etc