It's simple to program an animated infinity mirror on the Gemma M0 in Microsoft MakeCode! Just open and edit the sample code below and add to or change the light display as you wish. Or, create your own program using the strip code blocks, found in the LIGHT category. You can preview it in the simulator before you download it to your Gemma. There's more information about using MakeCode on the Gemma M0 guide.

To download the file to the board, connect the Gemma M0 to your computer with the USB cable. Press the reset button and it will go into bootloader mode. That means it's ready to receive code.

If it is your first time running MakeCode on your Gemma board, or if you have previously installed Arduino or CircuitPython, you may need to double press the reset button to get your board into bootloader mode.

Click download on the MakeCode page and save the file. It will have a .uf2 extension.

Then find the drive on your computer labeled GEMMABOOT. Drag and drop (or copy and paste) the program into Gemma! You'll know the code was downloaded when the onboard pixel changes to violet.

While the Gemma is still connected to the computer, check how the MakeCode runs on the actual NeoPixel strip so you can make any adjustments.

Next, you'll attach the lights and the Gemma and finish the box!

Optional: To make your box even fancier, use a Circuit Playground Express instead of a Gemma and add sensors and music to your infinity mirror! If you're new to using MakeCode with the CPX, check out the Adafruit MakeCode Guide.

This guide was first published on Feb 05, 2019. It was last updated on Mar 08, 2024.

This page (Program the Gemma M0 in MakeCode) was last updated on Mar 08, 2024.

Text editor powered by tinymce.