Light sensors are used in all kinds of robotics, industrial, and commercial applications. Next, let's teach it to navigate by visible light. By using a pair of small light sensors, called phototransistors, your ActivityBot can measure and compare the light levels on its right and its left. Then, it can turn toward the brighter side as it navigates. This way, the ActivityBot can be programmed to follow a flashlight, or find its way out of a dark room to a bright doorway.
Get Acquainted with the Phototransistor
The Propeller C Simple Circuits tutorial has a page devoted to the same phototransistor that is included in your ActivityBot kit.
- Go try the Sense Light tutorial, then return here when you are done.
- If you happened to remove the piezo speaker, be sure to put it back where it was.
Get the Example Code
- Make sure you have the latest SimpleIDE software, Learn folder, and ActivityBot Library.
- Download the ActivityBot Navigate by Light code.
- Unzip the folder, and copy its contents to Documents\SimpleIDE\Learn\Examples\ActivityBot Tutorial.
- Follow the links below to continue with the ActivityBot tutorial.