top of page
  • Black Facebook Icon
  • Black Instagram Icon
  • Black Pinterest Icon

How to Display Sad Face and Happy Face while Pressing Programming Button of micro:bit

Writer's picture: Apurva BhaleraoApurva Bhalerao

Updated: Mar 4, 2022

Following are the Steps for Displaying Sad Face and Happy Face while Pressing Programming Button of micro:bit

  1. Click this link https://microbit.org/

  2. Then click on official code editor Microsoft Make Code to do programming

  3. Then click on New Project and give project name as emoji then this window will display


4. First remove on start and forever block from editor workplace then from input drag and drop on button pressed block to run code when button A is pressed.



5. From basic drag and drop show leds block inside on button pressed to display a Sad Face emoji on the screen.



6. once again from input drag and drop on button pressed block to run code when button B is pressed, From basic drag and drop show leds block inside on button pressed to display a Happy Face emoji on the screen.



7. once again from input drag and drop on button pressed block to run code when button A+B is pressed, Add a secret mode that happens when A and B are pressed together. for this case, add multiple show leds block (sad face and happy face) to create an animation.




9. if you have a micro:bit connected into a laptop/ pc/ mobile using USB then , Click on download button and transfer your code ( hex file) to the micro:bit and see the result.

10. Press button A on the micro:bit , it will display sad face. then press B button to display happy face. now press A button and B button together, it will display sad face and happy face continuously


Result:


1. On button A pressed



2. On button B pressed



 


 

3. Press A button and B button together (A+B):



 



 
 
 

Enroll to Free Courses

Get In Touch

Address: Decent Enclave, 2nd Floor, Darga Rd, opp. More Mart, Ulkanagari, Aurangabad, Maharashtra 431001

Contact : +91-9404865609

Email

support (at) kitflix.com

  • Instagram
  • Facebook
  • Twitter
  • LinkedIn
  • YouTube

© 2022 by Kitflix Technologies Private Limited.

bottom of page