How the HC-SR04 measures distance with sound, its pinout and variants, then a live distance meter — the OLED shows real-time distance with a modern UI and the LED warns when an object gets too close.
Objectives: Explain trigger/echo timing · Convert echo time to distance · Set and act on a proximity threshold
Components: Arduino Uno · HC-SR04 · SSD1306 OLED · LED + 220Ω resistor
Chapters: Intro · Ultrasonic sensor · How it works · Pinout · Types · Components · Wiring · Demo · Code explained