Arduino ultrasonic sensor to trigger LED when path is blocked I'm working on a project which has falling objects non stop, I only want to detect when objects block the sensors set trigger area. Any suggestions would be great!

#define echoPin 7 // Echo Pin
#define trigPin 8 // Trigger Pin
#define LEDPin1 9 // LED 1

int maximumRange = 300; // Maximum range needed
int minimumRange = 10; // Minimum range needed
long duration, distance; // Duration used to calculate distance

void setup() {
    Serial.begin(9600);
    pinMode(trigPin, OUTPUT);
    pinMode(echoPin, INPUT);
    pinMode(LEDPin1, OUTPUT);
}

void loop() {
    /* The following trigPin/echoPin cycle is used to determine the
    distance of the nearest object by bouncing soundwaves off of it. */
    digitalWrite(trigPin, LOW);
    delayMicroseconds(2);

    digitalWrite(trigPin, HIGH);
    delayMicroseconds(10);

    digitalWrite(trigPin, LOW);
    duration = pulseIn(echoPin, HIGH);

    //Calculate the distance (in cm) based on the speed of sound.
    distance = duration/58.2;

    //If the distance is beyond the limits - then nothing happens ie,
    //more than 3 meters or less than 10 cm
    if (distance &gt;= maximumRange || distance &lt;= minimumRange) {
        Serial.println("Nothing Happens");
        digitalWrite(LEDPin1, LOW);
    } else {
        Serial.println("Trigger");
        digitalWrite(LEDPin1, HIGH);
        delay(200);
        delay(50);
    }
}


Arduino uno
4 pin ultrasonic sensor
Based on this 
You need at least 10mS delay from each readings to prevent unstable readings.

void loop() {
    digitalWrite(trigPin, LOW);
    delayMicroseconds(2);

    digitalWrite(trigPin, HIGH);
    delayMicroseconds(10);

    digitalWrite(trigPin, LOW);
    duration = pulseIn(echoPin, HIGH);

    distance = duration/58.2;

    if (distance &gt;= maximumRange || distance &lt;= minimumRange) {
        Serial.println("Nothing Happens");
        digitalWrite(LEDPin1, LOW);
    } else {
        Serial.println("Trigger");
        digitalWrite(LEDPin1, HIGH);
    }

delay(10);
}