Page 44 - RoboGenius Pro C5
P. 44

STEP - 6   Drag the show number block from the Basic category and place it inside
                                 the on button A pressed block.



                                                          on  button   A  pressed

                                                            show number  0



                                                                                          on  button   A  pressed
                    STEP - 7   Drag the temperature block from the Input
                                 category and place it inside the 0 of the show             show number temperature (°C)
                                 number block.


                                 Your block-based code should now look like this.

























                    STEP - 8   Click on Start the simulator button to run the program.


                  Output


                  When you press Button A on the Micro:bit, the current
                  temperature  appears  on  the  LED display.  As  the
                  temperature around the Micro:bit changes, pressing

                  the button again  shows a different reading, helping
                  you  to  see  how the  sensor  reacts  to  environmental

                  changes.



                   ECOTECH       Micro:bit uses very little electricity and small materials, so it is gentle on the
                   ENERGY        environment. You can reuse it for many projects, which helps reduce waste.








                                 RoboGenius Pro - V
                 42
   39   40   41   42   43   44   45   46   47   48   49