Community project

ESP32 Halo Display

Photo of ESP32 Halo Display
Generated with AI

Tsabit M . Z

Published December 3, 2026

The ESP32 Halo Display uses an HC-SR04 ultrasonic sensor connected to an Arduino Uno to measure distance and transmit the data to a laptop for real-time 3D visualization. The sensor detects objects up to about 400 cm away, making it useful for proximity sensing, object detection, and interactive display projects.

This guide provides a complete parts list, wiring diagram showing how to connect the HC-SR04 to the Uno, the Arduino firmware for reading sensor values, and step-by-step assembly instructions. Builders will learn how to interface an ultrasonic sensor with a microcontroller and visualize sensor data in real time on a computer.

Wiring diagram

Wiring diagram for ESP32 Halo Display
Loading diagram…

Gather all the parts

QtyComponent
1

HC-SR04

HC-SR04 ultrasonic distance sensor module with separate 40 kHz transmitter and receiver transducers, measuring 2 to 400 cm. A 10 us pulse on TRIG starts a measurement and ECHO stays high for the echo's round-trip time. This HC-SR04+ board runs from 3.3 V or 5 V.

Assemble it in 2 steps

1. Sambungkan sensor ke Uno

Cabut USB. Hubungkan sensor langsung ke pin Uno dengan kabel jumper female-to-male (tanpa breadboard). Hubungkan VCC ke 5V (daya), GND ke GND, TRIG ke D8 (pemicu), dan ECHO ke D9 (pantulan).

2. Jalankan visual 3D di laptop

Colok USB, pilih COM4 dan tekan Deploy. Tutup Serial Monitor, lalu buka data/jarak.html di Chrome atau Edge desktop. Klik Sambungkan Arduino dan pilih port Uno.

Review all connections

1. Connections between "sonar" and "Arduino"

FunctionsonarArduino
powerVCC5V
groundGNDGND
digitalTRIGGPIO 8
digitalECHOGPIO 9

Deploy the firmware

#include <Arduino.h>
constexpr int TRIG=8, ECHO=9;
void setup(){ Serial.begin(115200); pinMode(TRIG,OUTPUT); digitalWrite(TRIG,LOW); pinMode(ECHO,INPUT); }
void loop(){
 static uint32_t last=0;
 if(millis()-last<100)return;
 last=millis();
 digitalWrite(TRIG,HIGH);delayMicroseconds(12);digitalWrite(TRIG,LOW);
 const unsigned long us=pulseIn(ECHO,HIGH,26000);
 Serial.print(F("CM:"));Serial.println(us>=116&&us<=23200?int((us+29)/58):-1);
}

Remix this project

Make it yours in one click

Open a full copy of this project in your own Schematik workspace, diagram, code, parts, and assembly steps included. Swap the sensor, add features, or redesign the whole thing with AI. The author's original stays untouched.

Open in Schematik