Daphne
Published © GPL3+

Using Ultrasonic sensor to measure distance

HC-SR04 is a module that uses ultrasound to measure the distance. It looks like a pair of eyes in its appearance, therefore it’s often insta

BeginnerProtip-30 minutes75
Using Ultrasonic sensor to measure distance

Things used in this project

Hardware components

RTL8722DM_MINI
×1
Ultrasonic Sensor - HC-SR04 (Generic)
Ultrasonic Sensor - HC-SR04 (Generic)
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

Setting Up

Programming

Open the sample code in “File” -> “Examples” -> “AmebaGPIO” -> “HCSR04_Ultrasonic”

Final Result

Verify and upload the code. Press the reset button on Ameba once the uploading is complete. Open the Serial Monitor, the calculated result is output to serial monitor every 2 seconds.

Credits

Daphne
12 projects • 1 follower
Always ready to learn something new...
Contact

Comments

Please log in or sign up to comment.