This gadget was made using an ultrasonic sonar sensor.

Hardware Used

Arduino Nano
HC-SR04 Ultrasonic Ranging Sensor
I2C OLED 64x128 colour screen
8 LED Neopixel strip

The sensor sends out a ultrasonic pulse, which is then picked up by the receiver. The time taken for the pulse, determines the distance of the object. This sensor is pretty accurate and I used it to display the output on the screen in cm and inches. It also sets the LED's to the colour based upon distance. Behaving similarly to a parking sensor.