Microbit
Beginner
30 mins
Teacher/Student led
120 points
What you need:
Chromebook/Laptop/PC
Microbit

Emojis

Embark on a fun journey of programming your Microbit to display various emojis. Start a new project, create different faces such as asleep, happy, sad, and meh. Test your code in the simulator, add an angry face for when you shake your Microbit, design your own face, and finally, test your code on your Microbit.
Learning Goals Learning Outcomes Teacher Notes Lesson Files

Live Class Feed

This is a live feed of the latest activity by your students on this lesson. It will update in real-time as they work on the lesson.
Load previous activity

    1 - Create a new Microbit project

    Go to the makecode.com website and start a new Microbit project.

    2 - Show the asleep face

    In this lesson we're going to make our Microbits show different faces. At start let's show the asleep face, add the following code.

    basic.showIcon(IconNames.Asleep)
    
    

    3 - Make it happy

    Now let's program the A button to make our Microbit happy by showing the happy face. Add the following code.

    input.onButtonPressed(Button.A, function () {
        basic.showIcon(IconNames.Happy)
    })
    
    

    4 - Make it sad

    Now let's program the B button to make our Microbit sad by showing the sad face. Add the following code.

    input.onButtonPressed(Button.B, function () {
        basic.showIcon(IconNames.Sad)
    })
    
    

    5 - Make it meh

    The meh face is not quite happy and not quite sad, just kind of in between! Add the following code.

    input.onButtonPressed(Button.AB, function () {
        basic.showIcon(IconNames.Meh)
    })
    
    

    Unlock the Full Learning Experience

    Get ready to embark on an incredible learning journey! Get access to this lesson and hundreds more in our Digital Skills Curriculum.

    Copyright Notice
    This lesson is copyright of Coding Ireland. Unauthorised use, copying or distribution is not allowed.
    🍪 Our website uses cookies to make your browsing experience better. By using our website you agree to our use of cookies. Learn more