Electronics Projects
Ultrasonic Distance Meter
Measure distance with an HC-SR04 and show it on a 16×2 LCD.

Overview
The HC-SR04 gives a time-of-flight reading; the board converts it to centimetres and prints it on the LCD.
Build Steps
Wire the sensor
Connect VCC, GND, Trig to an output and Echo to an input.
Add the display
Wire the LCD's I2C backpack and run an I2C scanner to confirm its address.
Time the pulse
Hold Trig high for 10 µs, time Echo, multiply by the speed of sound and halve it.
Smooth the reading
Average the last few readings to remove jumps.
Related Projects
Automatic Plant Watering System
Water plants only when the soil is dry, using a moisture sensor, relay and small pump.
View project →Motion-Activated Night Light
Switch a light on automatically when a PIR sensor detects movement.
View project →OLED Weather Station
Show temperature, humidity and pressure on a small OLED screen.
View project →