septillion:
Although okay, I did made some errors 
We do need a check for parking lot is full. Because if 1 isn’t available it will print “parking lot full” before checking the next slot… This may be the blinking?
And I think you already found it, but there is a closing bracket to much…
Didn’t add F() macro everywhere…
Barrier up and traffic light green disappeared…
#include <LiquidCrystal.h>
#include <Servo.h>
const byte GreenLedPin = 9;
const byte RedLedPin = 10;
const byte BlueLedPin = 11;
const byte ServoPin = 8;
//and I like to define all pins just to make it clear
const byte ParkingSensorPins = {A0, A1, A2, A3, A4};
const byte NumberOfBays = sizeof(ParkingSensorPins);
LiquidCrystal lcd( 2, 3, 4, 5, 6, 7);
//Now all setting are nicely grouped at the top
const unsigned int ParkingSensorThreshold = 550;
const unsigned int LoopInterval = 200;
const byte BarrierUpValue = 90;
const byte BarrierDownValue = 0;
//I’m guessing your controlling a barrier with it?
//then just call it that 
Servo barrier;
void setup() {
Serial.begin(9600);
barrier.attach(ServoPin);
lcd.begin(16, 2);
}
void loop() {
lcd.setCursor(0,1);
for (byte i = 0; i < NumberOfBays; i++){
unsigned int val = analogRead(ParkingSensorPins[i]);
Serial.print(F("Testing bay “));
Serial.print(i);
Serial.print(F(” value = "));
Serial.println(val);
if (val >= ParkingSensorThreshold){
//set leds
digitalWrite(RedLedPin, LOW);
digitalWrite(GreenLedPin, HIGH);
digitalWrite(BlueLedPin, LOW);
//set barrier
barrier.write(BarrierUpValue);
//Print info to LCD
lcd.clear();
lcd.print(F("Parking bay "));
lcd.print(i + 1); //because computers start counting at 0
lcd.setCursor(0,2);
lcd.print(F(“is available”));
//No need to check for another bay if we found an empty one
break;
}
//If we are at the last bay (starting at 0)
if( (i + 1) == NumberOfBays){
//set leds
digitalWrite(RedLedPin, HIGH);
digitalWrite(GreenLedPin, LOW);
digitalWrite(BlueLedPin, LOW);
//set barrier
barrier.write(BarrierDownValue);
//Print info to lcd
lcd.clear();
lcd.print(F(“The parking lot”));
lcd.setCursor(0,2);
lcd.print(F(“is full”));
}
}
//waiting in a single spot. Now also easy to change it to millis() 
delay(LoopInterval)
}
sizeof() gives you the size of a variable in bytes. Applied to an array it will give the total size of the array, again in bytes. But because each entry in the array is a byte, it gives the number of elements in the array.
And that's the [F() macro](https://playground.arduino.cc/Learning/Memory). That will keep the text in program memory (on a Uno 32kB) instead if precious SRAM (2kB).
works great thanks for teaching me something new
I don’t think I can use this code because it looks too good to be true that I made it, I mean its my first code on Arduino and I will need to explain the code too, and I think its better if I stay with my code. ( it works too but takes less space on the Arduino)
thanks again for your help !!! :))