Page 81 - Ai Robogenius
P. 81

Design a program using the Micro:bit that tracks how many times the device is tilted within a
                 minute. Start by setting up a timer to track one minute. Then, use the on tilt block to detect when
                 the Micro:bit is tilted and create a variable to count each tilt. Display the tilt count on the Micro:bit

                 screen and ensure that the timer resets every minute, with the count starting over. Finally, add a
                 feature to display a message once the minute is up, such as Time’s up! or You tilted X times!





                 Goal




                 Setup






                 Observation




















                            Learning Micro:bit  and  sensors  can  open  career paths  as  a  Robotics  Engineer,
                            Embedded Systems Developer or IoT Specialist.




























                                                                                      Sensors in Micro:Bit
                                                                                                                    79
   76   77   78   79   80   81   82   83   84   85   86