You may want to look at Parallax's Robotics with the Boe-Bot (student guide), chapter 8.
Chapter 8: Robot Control with Distance Detection
In Chapter 7, we used the infrared sensors to detect whether an object is in the Boe-Bot’s way without actually touching it. Wouldn’t it be nice to also know how far away the object is? This is usually a task for sonar, which sends a pulse of sound out and records how long it takes for the echo to come back. The time it takes for the echo to come back can then be used to calculate how far away the object is. There is, however, a way to accomplish distance detection with the very same circuit you used in the previous chapter.
Bookmarks