That would be quite simple - you could use one of the code libraries that are linked to in the technical details on the product page (Python is likely easiest)
The code in this comment pretty much does what you were after.
The sensor itself has four loose wires for TTL Serial communication. The BLUART USB to TTL Serial adaptor (which you can select to include on the Ping Sonar page) has a micro-USB port, which you can connect to with any USB-A to micro-USB cable. If you’d like an extra short one for using in small spaces (e.g. an enclosure) you can scroll down to the “You may also need” section on the Ping Sonar page and add our 6" micro USB cable