Arduino Smart Blind Stick with Ultrasonic Sensor
Level 36 · The Stick That Sees · 35 minutes
A walking stick for somebody who cannot see: it looks ahead with a sonar and beeps faster as things get closer.

Preview the project free; a course seat is required to run and submit. No hardware kit needed.
Your project challenge
Make the stick beep faster as something gets closer. Wire it up: - HC-SR04: VCC 5V, GND GND, TRIG D4, ECHO D5 - Buzzer: pin1 D8, pin2 GND Start a 50 ms beep every: - 150 ms under 25 cm - 400 ms under 50 cm - 1000 ms under 100 cm Farther away: silent.
Components you’ll use
- Arduino Uno
- HC-SR04 Ultrasonic Distance Sensor
- Piezo Buzzer
What you’ll build
A walking stick for somebody who cannot see. It beeps faster as something gets closer, so they can hear what is ahead.
How it works
- Every pass of
loop()pings the HC-SR04 and turns the echo into centimetres. - Under
25cm: a beep starts every150ms. - Under
50cm: every400ms. Under100cm: every1000ms. - Farther than that: silence. The path is clear.
- Every beep is the same short
50ms chirp. Only the gap changes.
The key idea
The stick speaks in rhythm. Faster beeps mean closer.
Remember when the last beep started. Start the next one when millis() - lastBeep reaches the gap for this distance.
⚠ Watch out
Test the smallest distance first. If cm < 100 comes first, 12 cm matches it too. Then the stick ticks slowly at a wall right in front of it, and three checks fail.
The interactive editor includes the wiring guide, code editor and simulation controls.