Page 81 - Ai Robogenius
P. 81

on  button   A  pressed






                  STEP - 5   Drag the show icon block from the Basic category, in the on button A
                               pressed block.


                  STEP - 6   Click on the drop-down button of show icon block and select a happy face.


                                                         on  button   A  pressed

                                                           show icon




                   STEP - 7   Drag on button A pressed block from the Input category and click the
                               drop-down button and change it to B.


                                                         on  button   B  pressed





                  STEP - 8   Drag show icon block from the Basic category into the on button B

                               pressed block and choose a sad face after clicking on heart icon.


                                                         on  button   B  pressed

                                                           show icon




                               Your block-based code will look like this.





























                                                                             Creative Projects with Micro:Bit
                                                                                                                    79
   76   77   78   79   80   81   82   83   84   85   86