How to display on my number of free parking on 4 digit 7segment using IR obstacl

Hi.
What model Arduino are you using?

Looking at your code you are trying to multiplex your digit display with code.
You will have major flicker problems due to your code having to do other things while trying to control your segments.

Have you written this code in stages?

Does your car detection system work?
Do you have code written just prove the detection works?

Do you have code just to make your display count?

If you haven't, then stop and develop your code in stages, get each stage working before going to the next.
When you have each feature of your code working separately then combine them, one at a time, getting the combination to work before adding the next.

I know this sounds laborious but it means you will be making code that YOU understand and that has fewer bugs and faults.

Tom.... :slight_smile: