Page 24 - RoboGenius Pro C3
P. 24

If the robot tries to do these steps
                  in the wrong order, like trying to             SMART        Ai-Da is a smart robot that can draw

                  release the part before picking                SPARK      and paint. It learns by looking at pictures
                  it  up,  the  part  might  fall or not                        and then makes its own artwork.
                  reach the belt at all.



                  LOOP


                  Sometimes, robots need to do the same thing
                  again and again. A loop helps the robot repeat

                  the same actions automatically, so you don’t
                  need to tell it every time.

                  Imagine a robot that needs to sweep the floor.
                  Instead  of telling  the  robot  to  move  forward,

                  turn left and sweep the floor three times, you
                  can use a loop. This makes it much easier to program the robot.

                  For example, the following instruction can be given to the robot to clean the floor:

                  Repeat 3 times:
                                                                            If a robot sees someone getting hurt,
                     Move forward
                                                                             should it stop and alert a human for
                     Turn left                                               help immediately to ensure safety?

                     Sweep the floor

                  By using a loop, the robot will repeat the given three steps three times without you
                  having to write them out each time. This saves time and makes the program simpler.



                           VISUAL VAULT

                           Guide the robot to move from its starting point to the Star, by following the
                           given code:
                           Start

                           Repeat 2 times:

                           Move forward 1 step
                           Turn right

                           Move forward 1 step

                           Stop





                                 RoboGenius Pro - III
                 22
   19   20   21   22   23   24   25   26   27   28   29