# Emotion badge: a free micro:bit lesson from Maze Education
# https://maze.education/microbit/lessons/emotion-badge
# MicroPython for the micro:bit Python Editor: https://python.microbit.org

# Emotion badge: A for happy, B for sad, shake for surprised.
from microbit import *

display.show(Image.ASLEEP)
while True:
    if button_a.was_pressed():
        display.show(Image.HAPPY)
    if button_b.was_pressed():
        display.show(Image.SAD)
    if accelerometer.was_gesture("shake"):
        display.show(Image.SURPRISED)
    sleep(100)
