Page 71 - Robo_Genius_V1.0_flipbook_C4
P. 71

display. If “direction” is equal to 2, then the arrow points east. Otherwise,
                    the arrow points west.

                    To make the battery last longer, the program pauses for half a second after

                    the arrow appears then clears the screen.


                 Concepts

                 1.  Direction Detection using Accelerometer

                     Students  will  learn  how  the  micro:bit’s  accelerometer  detects  tilts  and
                    movements in different directions. They will understand how devices sense

                    motion and use this information to trigger an output.

                 2.  Conditional Logic in Programming
                     Students  will  explore  how  to  use  “if-else”  logic  to  create  conditions  for

                    displaying specific arrow directions. For example, if the micro:bit is tilted to
                    the right, a right-facing arrow will blink, reinforcing their understanding of

                    logic-based decisions in programming.
                 3.  Visual Output on LED Grid


                     Students  will  learn  how  to  control  the  LED display  by  programming  the
                    micro:bit  to  show  different  arrow  symbols  that  represent  the  direction
                    detected by the accelerometer. This concept connects to visual representation

                    in programming.

                 Observations


                 In the Direction Blinking Arrow using Micro:bit activity, students will observe
                 how the micro:bit responds to tilting in various directions. When the micro:bit is
                 tilted to the right, a blinking right arrow appears, and when tilted to the left, a

                 left arrow blinks. This gives them hands-on experience with how sensors detect
                 movement and how these movements are converted into programmed actions.

                 students  will  observe  how  quickly  and  accurately  the  micro:bit  responds  to
                 changes in direction and how the LED display adapts.


                 Application

                 Fitness Trackers:  These  devices  use accelerometers  to

                 track movements, such as steps, running, or other physical
                 activities, helping users monitor their health.



                                                                    Introduction to Micro:bit and Programming  69
   66   67   68   69   70   71   72   73   74   75   76