SR04 is a module that can detect distance between 2cm to 400cm by sending out ultrasonic waves and calculating the time between the sent signal and echo received.
Steps:
Send the trigger signal - a TTL 10us signal
Wait for the echo pin to get high.
Calculate the time for which the echo pin is high using a timer.
Calculate the distance using
Distance = high level time * velocity (340M/S) / 2
V-USB is a software-only implementation of a low-speed USB device for Atmel’s AVR® microcontrollers, making it possible to build USB hardware with almost any AVR® microcontroller, not requiring any additional chip. More Info can be found out here