First experiments with makecode and micro:bit

At the MVP Global Summit, I heard about MakeCode for the first time. The project makes it really easy for people to get a first contact, introduction with code and computer science. I got the chance to play around with the Micro:bit which has a whole range of sensors and can easily be programmed from MakeCode.

I decided to experiment and tried it out with two 12 year olds and a 10 ten old.

MakeCode

The https://makecode.com/ website provides a whole range of links, getting started lessons, or great ideas on how people can use this. We experimented firstly with the MakeCode Micro:bit. This software can be run from any browser, and the https://makecode.microbit.org/ can be used to experiment, or programme the Micro:bit.

Micro:bit

The Micro:bit is a 32 bit arm computer with all types of sensors, inputs and outputs. Here’s a link with the features: http://microbit.org/guide/features/

The Micro:bit can be purchased almost anywhere in the world. Links for your country can be found here: https://www.microbit.org/resellers/

The Micro:bit can be connected to your computer using a USB cable.

Testing

Once setup, I gave the kids a simple introduction, explained the different blocks, and very quickly they started to experiment themselves. The first results looked like this, which they called a magic show. Kind of like the name.

I also explained the code, and they could understand how to change to code, and how it mapped back to the block code. The mapping between the block code, and the text code is a fantastic feature of MakeCode. First question was why bother with the text code, which meant they understood the relationship, so I could explain the advantages then.

input.onButtonPressed(Button.A, () => {
    basic.showString("HELLO!")
    basic.pause(2000)
})
input.onGesture(Gesture.FreeFall, () => {
    basic.showIcon(IconNames.No)
    basic.pause(4000)
})
input.onButtonPressed(Button.AB, () => {
    basic.showString("DAS WARS")
})
input.onButtonPressed(Button.B, () => {
    basic.showIcon(IconNames.Angry)
})
input.onGesture(Gesture.Shake, () => {
    basic.showLeds(`
        # # # # #
        # # # # #
        # # # # #
        # # # # #
        # # # # #
        `)
})
basic.forever(() => {
    led.plot(2, 2)
    basic.pause(30)
    led.unplot(2, 2)
    basic.pause(300)
})

Then it was downloaded to the Micro:bit. The MakeCode Micro:bit software provides a download button. If you use this from the browser, it creates a hex file, which can be downloaded to the hardware per drag and drop. If you use the MakeCode Micro:bit Windows Store application, it will download it directly for you.

Once downoaded, the magic show could begin.

The following was produced by the 10 year, who needed a bit more help. He discovered the sound.

Notes

This is a super project, and would highly recommended it to schools, or as a present for kids. There are so many ways to try out new things, or code with different hardware, or even Minecraft. The kids have started to introduce it to other kids already. It would be great, if they could do this in school. If you have questions or queries, the MakeCode team are really helpful and can be reached here at twitter: @MsMakeCode, or you can create a github issue. The docs are really excellent if you require help with programming, and provides some really cool examples and ideas.

Links:

http://makecode.com/

https://makecode.microbit.org/

https://www.microbit.org/resellers/

http://microbit.org/guide/features/

4 comments

  1. […] First experiments with makecode and micro:bit (Damien Bowden) […]

  2. iamtimcorey · · Reply

    Hey, I saw the same presentation. I went home and got my boys (14 and 13) started on the Makecode Minecraft. They love it and are already dreaming up new programs to write. The next step will be to get them to start writing the JavaScript instead of using the drag and drop.

    1. Ruslan

      Thanks for the link

      Greetings Damien

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: