This code is used with a ultrasound sensor, arduino pro micro, and a small OLED screen. Remember to download the necessary libraries. This can be done in the arduino software or manually. Links can be found Here for the adafruit_SSD1306.h and Here for the adafruit_GFX.h
This can be used to take rough measurements of small rooms
The sensor is activated with a 10 µs pulse. The result of this is a soundwave that travels the distance we want to measure twice. We measure the time it takes for the sound to travel this distance. As a result of this we have to divide by 2.