Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 49 - RoboGenius Pro C4
P. 49

    The accelerometer measures movement in three directions: side to side, up and
                     down, and forwards and backwards. It measures movement along three axes:

                        X-axis: Tilting from left to right.

                        Y-axis: Tilting forwards and backwards.

                        Z-axis: Moving up and down.

                     Let  us look at  how accelerometers  are used  in airbags  in modern  vehicles. An
                     accelerometer detects the rapid deceleration of a vehicle, and if this occurs, the
                     airbags are deployed to protect the passengers.

                                                               The accelerometer allows the
                                                  SMART       Micro:bit to track movement in
                                                  SPARK             different directions.

                     COMPASS SENSOR

                     The Micro:bit also has a compass sensor, which
                     helps the device  detect  magnetic  fields and

                     determine the direction it is facing. This sensor uses
                     the Earth's magnetic field to detect the device's               Compass
                     orientation  relative  to  the  cardinal.directions:              Sensor
                     North, South, East and West.

                     When you  hold the  Micro:bit,  the  compass  sensor detects  the  strength  and
                     direction of the magnetic field around it. It then uses this information to calculate

                     the heading (the direction the device is facing) and displays it on the screen. You
                     can see the direction represented as a number, typically between 0° (North) and
                     360° (also North) or the Micro:bit can show a visual indicator like an arrow pointing
                     to the current direction.

                     The compass sensor works based  on the Earth's  magnetic  field, much  like  the
                     compass you use to navigate. As you turn the Micro:bit, the sensor continuously

                     updates its reading, allowing it to track the direction and orientation of the device
                     in real time.

                                                                                          Sensors in Micro:Bit
                                                                                                                        47

| 44 45 46 47 48 49 50 51 52 53 54 |