This uses Arduino and hardware to feed data into Processing for the graphical user interface.
It’s an amalgamation of a couple of tutorials already out on the internet.
Firstly the use of an ultrasonic range-finder (here) and some Processing drawing (here). The complete project was created by Dejan Nedelkovski at howtomechatronics.com which has some good breakdowns of what the code actually does.
I did, however, make some changes to the Processing code. These were just little tweaks to make the app fullscreen and added and added the ability to exit with the ESCAPE key. The code used and a video of it working can be found below.