Page 133 - KEC Khaitan C6 Flipbook
P. 133

Extra Challenge:

                           ∑   Create a Theremin using the light sensor to change pitch based on brightness.
                           ∑   Use loops to make continuous music.




























                 Step  7   Using the Accelerometer in Micro:bit
                           What is an Accelerometer?

                           An accelerometer is a sensor that detects motion, tilt, and shaking.

                 Step 7.1  Making a Dice with Micro:bit

                           ∑   In Input, add On shake block.

                           ∑   Inside it, add a Show Number block from Basic.
                           ∑   Use Pick Random block from Math (set range 1-6).
                           ∑   Test the dice by shaking the Micro:bit!

























                           Extra Challenge:

                           ∑   Use LED patterns to display dots instead of numbers.




                                                                                          Exploring Microcontrollers  131
   128   129   130   131   132   133   134   135   136   137   138