Page 50 - The Unofficial Guide to Lego Mindstorms Robots
P. 50

39


          3
          Trusty, a Line Follower


          In this chapter:


          Building Instructions


          Some Tricky Programming


          The Light Sensor


          Idler Wheels


          Using Two Light Sensors


          Online Resources


          In this chapter, you'll build Trusty, a simple robot that exhibits a behavior called line following. This means that Trusty, shown
          in Figure 3-1, can drive along a sort of ''track" defined by a thick black line on the floor. Your RIS kit includes a "Test Pad,"
          which is simply a large piece of white paper with some black lines and other marks on it. Trusty will follow the large black
          oval on this paper faithfully until he runs out of battery power.


























                                                        Figure 3-1.
                                                    Trusty, a line follower

          As you can see in  Figure 3-1,  Trusty's  main feature is a downward  pointing light  sensor. This sensor is the  key to line
          following. The light sensor can distinguish between the white background of the Test Pad and the black line drawn on it. As
   45   46   47   48   49   50   51   52   53   54   55