Today in Programming: Microsoft MakeCode


Since I’ve been making a lot of great progress programming with the kids in Scratch, I bought some Circuit Playground Expresses to program with the kids. The Circuit Playground Express can program in Arduino’s C dialect, CircuitPython, or Microsoft MakeCode, which uses blocks like Scratch. Today Scarlett and I made our first useful bit of code, a digital spinner we called The Sibling Chooser. Here’s the code, and you can see that it is indeed like Scratch:

Microsoft MakeCode code for this project
Microsoft MakeCode code for this project

After we tested the code in the website’s simulator, Scarlett got to work on the spinner background.

Scarlett’s Spinner Background

And here’s the finished version with the page where we figured out the logic for the program:

The final spinner and the logic

Here’s a video of it in use:

Sibling Chooser in action

Afterwards, I remembered that I had a JST battery holder that I’d bought for use with an Arduino project. So this is how it looks with the battery holder – the most important part being that it no longer blocks anyone’s name:

Sibling Chooser with JST battery pack

It was neat being able to come up with a useful project and Scarlett was able to understand the code enough to help me find an error when I was trying to figure out the logic. I look forward to more electronics projects with the kids.