The HC-SR04 sonar modules are available for a mere pittance and, with some coaxing, can do a pretty decent job of helping your robot measure the distance to the nearest wall. But when sellers on eBay ...
His hardware hack of the SR04 made this a software problem which he also managed to solve! [Clint] was working with the Arduino library, based on the Parallax PING, which uses a single pin for trigger ...