Here is a funny sonar created for Tri-Track.
It works with a MG90 servomotor and a SR-04 ultrasound distance sensor all managed by arduino mini and controlled in last instance by a more powerfull computer with ESP8266 Wifi module.
More interesting is the arduino software to manage all components WIFI, servos, magnetron and sonar. Very dificult for a arduino mini. I upload this code because i think is very useful.
At this moment i'm traslating all code to run on a ESP8266.
Also i have a little program in python for remote control that also pretends a simple SLAM algorithm but no profitable results at this moment.
A solid piece is prefereable. Use a good infill