KRITSADA

Button is press

Oct 28th, 2019
783
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Write your code here :-)
  2. from microbit import *
  3.  
  4. while True:
  5.     if (button_a.is_pressed()):
  6.         display.show(Image.HAPPY)
  7.     elif (button_b.is_pressed()):
  8.         display.show(Image.SAD)
Add Comment
Please, Sign In to add comment