|
This app note shows how to load, execute, and interpret results from a multi-mode program which uses Sun SPOT as the application brain for TrackBot. SPOT's eight RGB LEDs are put to great use to display TrackBot sensor status. Use the SPOT buttons to select three operating modes:
- Monitor
- TrackBot doesn't move, it just displays the state of all IR sensors (including optional Cliff sensors, if installed) on the Sun SPOT RGB LEDs. Also displays the output of the TrackBot infrared ambient light sensor. These displays are also active in the Avoider and Wanderer modes.
- Avoider
- TrackBot trys to stay away from all obstacles detected by fore and aft sensors. If fore and aft directions are blocked, TrackBot side sensors are checked for a possible escape route, and TrackBot will turn as needed. If no fore and aft obstacles are detected, TrackBot sits quietly.
- Wanderer
- TrackBot wanders around forever, trying to avoid obstacles by using IR sensors in a manner similar to Avoider.
Make things more interesting by putting a mixture of Avoider and Wanderer TrackBots in the same closed space.
These same three modes are also supported in the Greenfoot simulator! |