Page 207 - Robots Androids and Animatrons : 12 Incredible Projects You Can Build
P. 207

b5 = b4   30
                                                          ‘Make 2-s timing loop
                                       for b6 = 1 to 120
                                                      ‘Turn servo
                                       pulsout 3, b5
                                                 ‘Adjust timing (55 Hz)
                                       pause 18  ‘Create servo direction
                                       next b6   ‘Loop
                                goto start   ‘Read microcontroller 1
                                vl:   ‘Veer left
                                b5 = b4 + 30   ‘Create servo direction
                                       for b6 = 1 to 120  ‘Make 2-s timing loop
                                       pulsout 3, b5  ‘Turn servo
                                       pause 18  ‘Adjust timing (55 Hz)
                                       next b6   ‘Loop
                                goto start
                                The finished robot is shown in Fig. 8.18.

                         Behavior

                                The robot needs to function in a low-light environment, where it
                                can clearly see a bright light source. The light level required of my
                                robot was so low I needed to fabricate tiny sunglasses out of colored
                                plastic to reduce the light intensity hitting the CdS photocells.
           186                  The prototype robot exhibits the following behavior. In ambient
                                light (no bright light source) the robot travels in a straight line (or
                                circle depending upon the last light source target). If the ambient




























                                  8.18 Front view of finished robot

                                                       Team LRN
            Chapter eight
   202   203   204   205   206   207   208   209   210   211   212