problem with 7 segment and ultrasonic distance sensor

thank you for your help, I will try your code later and post the result, but when I delete delay(50), it will stop blinking and when I change the value of delay(), it will blinking faster or slower, thank you again.