Microsoft MakeCode provides an exceptional environment for programming microcontrollers. The block-based coding includes capabilities that take advantage of board features.

MakeCode runs well with the Google Chrome browser in Chromebooks in addition to Microsoft Edge on PCs and other modern browsers.

Loading MakeCode

Start your Chromebook and load the Chrome web browser (the Chrome icon looks like a four-color beach ball). Put the following into the address bar:

Microsoft will change the address slightly, no worries. You can click the star icon in your address bar to make this a favorite.

Select the board you are going to program.

The rest of this guide will generally assume you are programming an Adafruit Circuit Playground Express which is both MakeCode and CircuitPython compatible.

Clicking the board will take you to a screen specific to the board you chose. Choosing Adafruit Circuit Playground Express takes you to

You have several choices at this point:

New Projects

You can start a new project with the New Project button. If you have any previous projects, like mine titled "Untitled" from 7 months ago, they will appear next to New Project.

Load UF2 files (existing project files)

If you have a project on a disk, say on a flash drive or on your Google Drive in a file that ends in .UF2, then you can use the Import button circled above to load that file in for editing.

Load an existing MakeCode page and Download to CircuitPlayground

If you are working with an Adafruit tutorial and there is a link or button to the Microsoft MakeCode for the project, you can click that and it should automatically open in the editor in Chrome. As an example, the Adafruit tutorial MakeCode for Circuit Playground Express has an example near the bottom of this page that will download a UF2 code file of the color wheel example.

Another example is shown below - Soil Moisture with Circuit Playground Express has code on this page.

You will get a browser page such as the following:

You can work with the code in this window but it is best to load the code into the full MakeCode editor. Select the Edit button in the upper right and then you'll get a new browser tab with the full MakeCode program.

Note the large pink Download button in the lower left - we'll use it soon!

Using MakeCode

You use MakeCode on Chrome the same as on other operating systems at this point. See the following tutorials for information or for their tutorials:

Loading the MakeCode Program to Your Device

When you have the code ready to load to your device, plug your device (such as an Adafruit Circuit Playground Express) to the Chromebook via a USB Male A to USB micro-B cable.

Be sure to use a USB cable with both power and data wires, preferably a good quality cable. If your program does not load, you might have a bad cable, try another and never use the tiny ones that come with cell phone backup batteries, they are power only.

When you have your program ready to load, press the Reset button on the board once. For the Circuit Playground Express the circle of LED lights turns red then green. This means it is ready. The device should now be recognized by the Chromebook as a flash drive named CPLAYBOOT in the Files app.

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 the pink Download button in the MakeCode window. A File Save box pops up. 

Unfortunately you cannot drag the file to the CPLAYBOOT drive in this window, you must save the file to a drive first. This is a current MakeCode restriction.

Save the file on whatever drive you wish. Using My Files -> Downloads is ok unless your teacher says otherwise, other choices could be your own connected flash/thumb drive.

Open the Files app and click on the drive you saved your file on (like My Files -> Downloads). Now you can drag that file name to the CPLAYBOOT drive. If you don't see a drive named CPLAYBOOT (or similar for other boards), then ensure that:

  1. You have the board connected via a good USB cable to the USB port of the Chromebook
  2. You have pressed the Reset button and the lights are green and you have a CPLAYBOOT (or similar for other boards) drive in the Files app.

Your program should now be running!

Whenever you make changes, you'll need to do the same steps of saving the file to a disk then dragging the uf2 file to the CPLAYBOOT drive, after it appears by pressing Reset on the board.

Saving Your Work: Files

When you are done with your work, you should save your progress back to a file. Click the big pink Download button in the lower left. You'll get a screen like the one below:

Use the left panel to set where the file should be saved to. If you select My Files -> Downloads, they will be saved on the Chromebook. If you share the Chromebook, put a USB flash drive in and select it. You can consider using Google Drive also in this area.

The file name is circled in pink above. You can type any file name you want, but note you should use dashes between words instead of spaces. The end of the file must be .uf2 so it can be loaded on your project or in MakeCode later. When you have the save location and filename done, click the Save button.

You can use the Import button discussed previously to reload a .uf2 MakeCode file to use the code again.

This guide was first published on Nov 14, 2018. It was last updated on Nov 14, 2018.

This page (Using MakeCode) was last updated on Nov 13, 2018.

Text editor powered by tinymce.