ultrasonic_sensor Here is code for the project in which the number of lighted on LEDS depends on the distance (nearer an object - more LEDS are ON ) Microcontroller - Atmega 32 ultrasonic distance measurer - HC-SR04 Scheme: