I ask you for a little help with a school project that I am doing and I am using an Arduino Uno. The project is a car park for 8 spaces with a free indicator park and park complete with an inlet and an outlet (using servos) and if possible a 7-segment display (which indicate the number of vacancies in park). My idea was that if a car was to enter the park opened the barrier for 5 seconds and after that time the barrier closes and this car is added to the count and exit when a car is about to leave the barrier opens and closes after 5 seconds a car and is taken to the count. When the park is full, the red light comes on and as soon as a car leaves the red light turns off and turns on the green light.
Will can give me a little help?