Page 115 - Robo_Genius_V1.0_flipbook_C5
P. 115

they shine a flashlight or move the robot in varying lighting conditions, they will
                 notice that the robot behaves differently depending on the light intensity. This

                 shows them how sensors work in robotics to detect environmental conditions
                 and drive mechanical responses.


                 Application

                 Automatic Night  Lamps:  Light  sensors  can  be

                 used in night lamps to turn on automatically when
                 it gets dark. This way, the lamp lights up when you

                 need it without having to flip a switch.

                 Combining Sound Sensors and Motor


                 Let's learn how to combine sound sensors and motors to build a simple robot
                 that reacts to sound, using the micro:bit’s microphone sensor.

                 Building a Simple Robot that Reacts to Sound


                 In this activity we will use microphone sensor of micro:bit. That measures a
                 level of sound. Microphone respond to claps and beats with an animated light
                 show on display of micro:bit.

                 The  micro:bit  with  sound  has  a  built-in

                 microphone  sensor.  It  can  react  to  loud  and
                 quiet sounds, and also measure how loud your
                 environment is.

                 It  can  be  used  to  respond  to  sound.  The

                 microphone input sensor is located on the front
                 of  the  board  alongside  a  microphone  activity
                 LED, which is lit when the microphone is in use.


                    • When the microphone detects a loud sound, like a clap, it shows a large
                    heart on the LED display.
                    • If it detects a quiet sound, for example after your clap has finished, it shows

                    a small heart.

                    • The effect of this is to create a simple heart animation that responds to
                    claps or strong beats in music.







                                                                             Basic Motor Control and Sensors  113
   110   111   112   113   114   115   116   117   118   119   120