This is very easy to link to an Arduino (https://www.makerguides.com/jsn-sr04t-arduino-tutorial/) but I am thinking an esp32 camera module may be a good option as these are around £5 have built in sd card reader and would be able to capture a picture of the passing car as well as record the distance.
I will give it a try and report back but may have difficulty with it being 3.3v and very limited IO pins available...
Update: I now have the software working and next step is to attach it to my cycle and see if it looks like it will work. It continually reads distance and if this drops below a set threshold it takes a picture and stores it on to an sd card along with the measured distance.
BTW - Anyone interested I have posted my progress so far on github at https://github.com/alanesq/ESP32Cam-range
prototype v1.0
