You use an IF statement (see the PBasic manual) to test for a distance between specified bounds like
if (dist < maxDist) and (dist > minDist) then
... do something ...
endif
The "do something" depends on what you want to do. Go through the "Whats a Microcontroller?" tutorial for discussions of how to control LEDs or buzzers with a Stamp. You can download the tutorial here: www.parallax.com/html_pages/edu/curriculum/sic_curriculum.asp along with other useful tutorials.
Comments
The "do something" depends on what you want to do. Go through the "Whats a Microcontroller?" tutorial for discussions of how to control LEDs or buzzers with a Stamp. You can download the tutorial here: www.parallax.com/html_pages/edu/curriculum/sic_curriculum.asp along with other useful tutorials.