HC-SR04 RADAR Using Processing and Arduino

Hello world! Today i made a cool little MiNi RADAR that detects objects and displays it on your computer by using the Processing IDE & Arduino. the HC-SR04 RADAR Using Processing and Arduino is easy to build.

You need 2 IDE’s.
Arduino IDE
Processing IDE

In the processing code you need to take 2 steps.
First change the COM port at line 29 to the right COM port that you are using on arduino.
Second (optional) Change the Font at line 31(ONLY if you have a error with the font) Simply go to tools/make font/ and copy the font name that you want to use and the error should disappear.

Unzip the File: “Arduino_RADAR_HC_SR04 Code” to Documents/processing/ to a map named “Arduino_RADAR_HC_SR04” There is also a data map which contains the font so you won’t have a error with fonts.

Download: Arduino_RADAR_HC_SR04 Code

HC-SR04 RADAR Using Processing and Arduino
Just wire it up like the schematic upload the code and it should work.

Do not execute/run the processing code when uploading to arduino because they both use the same com port, This will create a conflict and results into a error.

After uploading the arduino code to arduino, run the code in the processing IDE by pressing the play button and a window should pop up with a radar. Now place your object and see if it is detected by showing a red color on the radar.

Parts list:
arduino uno, i used the RobotDyn Uno.
HC-SR04 Ultrasonic Range Sensor.
Servo Motor. (+ optional Mount attached on it for the HC-SR04, create one or buy one) i made one from carton, and hot glued the wires.
Jumper wires set. MM/FF/MF
Object to detect.

Arduino Code:

Processing Code: “Arduino_RADAR_HC_SR04”

Danny van den Brande


Programmer, Game Designer, 3D Designer, Web Designer, Graphic Designer. Jup this website looks crappy.. :) But enjoy the projects! Everything you need is here.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.