Page 92 - Toucpad robotics C11
P. 92

Purpose
              Flowcharts make algorithms easier to understand, analyse, and communicate, especially for complex processes. They
              provide a visual overview of the program’s logic.
              Common Symbols

                  Oval/Terminal: Represents the start or end of a program.
              u
                  Rectangle/Process: Represents a specific action or process (e.g., “Move Forward,” “Read Sensor”).
              u
                  Diamond/Decision: Represents a point where a decision is made (a question with “Yes/No” or “True/False” answers).
              u
                  Parallelogram/Input/Output: Represents data input or output operations.
              u
                  Arrows/Flowlines: Show the direction of the process flow.
              u
              Example


                                                      Start



                                                Task assigned to the          Self-localisation
                                                     Robot


                                               NI Board process and         Position Refinement
                                                 Controller signal
                                                                            Communication and
                                                                                Evaluation

                                                    Sensors       Yes
                                                     Signal?               Problem Identification

                                        No
                                                      No

                                                Continue Searching




                                                      Task
                                                   Completed?



                                                      Yes

                                                      End


              Application in Robotics
              Before writing actual code, robotic engineers often draw flowcharts to design the robot’s behaviour logic.

              Example Flowchart Segment (for the line-follower)
                  (Start - Oval) ->
              u
                  (Read Sensors - Parallelogram) ->
              u
              u   (Left Sensor ON AND Right Sensor ON? - Diamond) ->
                  ∑  If Yes -> (Move Forward - Rectangle) -> Loop back to “Read Sensors”
                  ∑  If No -> (Left Sensor ON AND Right Sensor OFF? - Diamond) ->
                       If Yes -> (Turn Left - Rectangle) -> Loop back to “Read Sensors”
                    §
                       If No -> ... and so on.
                    §
              90
              Touchpad Robotics - XI
   87   88   89   90   91   92   93   94   95   96   97