Page 65 - Robo_Genius_V1.0_flipbook_C4
P. 65

Step 6  Connect micro:bit to its cable and USB port of computer/laptop.

























                 Step 7  Micro:bit is connecting with the computer/laptop. Now click on the
                            download button to upload the code inside the micro:bit.























                           Click here




                 Output


                 This program uses a variable called ‘count’ to keep track of the number you’re
                 counting.

                    It sets the variable to 0 at the start.

                    Every time you press button B, it increases the count variable by 1 and shows
                    it on the LED display.

                    Numbers over 9 will not stay on the display, so pressing button A shows the

                    number.
                    You can reset the counter by pressing buttons A and B together.



                                                                    Introduction to Micro:bit and Programming  63
   60   61   62   63   64   65   66   67   68   69   70