“The HC-SR04 is very easy to implement. but remember that the pins on the RPi require 3.3v which can be reduced from the 5v of the ECHO pin on the sensor by using voltage divider resistors. I successfully programmed the RPi 1B to work as an obstacle-avoidance vehicle.”
“Works well. I only wish it had a in-built voltage divider so I don't have to solder resistors. At least pihut has a great article about that. Nevertheless, it's a good sensor to play with.”