Member-only story
Arduino Sonar Display using Processing — Radar & Waterfall
Ultrasonic obstacle detection using an Arduino UNO and visualisation using a Raspberry Pi.
The PING or its cheaper clone the HC-SR04 are often used in robotics as a means of obstacle detection. For some time now we have been meaning to put together a means of visualising what the sensor is detecting. This is useful in diagnosing the performance of your robot as it moves around its environment.
To read the HC-SR04 data and control the pan servo we used an Arduino Uno variant (the DFRobot Romeo BLE) that we already had. This is programable via Bluetooth but this isn’t necessary, any vanilla uno will do. Our setup also included a tilt servo, but this isn’t used currently.
We 3D printed a mount for the Arduino which also provides a base for the servos and ultrasonic sensor. The Arduino sketch is very straight forward. It pans the servo from 10 to 170 degrees, with 90…