Getting your code into your device is very easy with MakeCode. You do not need to install any software on your machine and the process takes two steps:

  • Step 1: Connect your board via USB and enter bootloader mode
  • Step 2: Compile and Download the .uf2 file into your board drive

We are going to go through these two steps in detail.

Step 1: Bootloader mode

Connect your board to your computer via a USB cable. Press the reset button once to put the board in bootloader mode.

If it is your first time running MakeCode 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.

When the Circuit Playground Express is in Bootloader mode, all the LEDs will turn red briefly, then green. Verify your status LED is also pulsing red. Your computer should show a new removable drive called "CPLAYBOOT"

 If the LEDs are all red: Either the computer is still installing drivers (Please wait a minute, Windows takes some time to install updates.) or you have a bad USB connection. If you keep getting red LEDs - try a new USB cable (you may want to ensure your USB cable is not charge only, it needs to transfer data) or a different USB port.

circuit_playground_drives.png

circuit_playground_drivesmac.png

Once your LEDs are all green, you should see a CPLAYBOOT drive appear in your drive list in your file explorer.

We are now ready to compile our blinky code and download it to our board! 

Step 2: Compile and Download

Let's first verify that our code compiles properly in MakeCode.

MakeCode has a built-in simulator that re-loads and re-runs code when restarted. This is an easy way to both ensure that our code compiles and simulate it before moving it onto the board. The refresh button re-loads the simulator with your latest version of block code. 

If you receive a "we could not run this project" error, please check over your code for errors.

If your board is working in the simulator, it's time to download it to your actual board! Click the "Download"  button. It will generate a .uf2 file and download it to your computer (UF2 is a file format designed to flash microcontrollers over USB).

General Steps to copy over your program (not specific to any Operating system)

  1.  Ensure your board is in bootloader mode.
  2. Find the .uf2 file generated by MakeCode in your file explorer. Copy it to the "CPLAYBOOT" volume. 
  3. The status LED on the board will blink while the file is transferring. Once it's done transferring your file, the board will automatically reset and start running your code (just like in the simulator!)
On a Mac, you can safely ignore the "Disk Not Ejected Properly" notification that may appear after copying your .uf2 file.

Windows: Open Windows Explorer (Windows key + E key) and locate the "blinky.uf2" file you generated. It's probably in  your Downloads folder!

You can copy/paste the file to your CPLAYBOOT volume or you can drag/drop it like in the GIF below. 

macOS: Open Finder and locate the "blinky.uf2" file. You can copy/paste this file to the "cplayboot" volume or drag/drop it from the same finder window. 

If you want to avoid the copying process: You can download your programs directly to the board. To do this: change the download location in Chrome, Firefox, Safari, or Opera to the main directory of your "CPLAYBOOT" volume.

Running MakeCode that's Already Loaded

If you unplug your board and then plug it back in again to your computer, it may not run the program again automatically. If it instead shows all green NeoPixels, just press the reset button and your program will start.

This guide was first published on May 16, 2017. It was last updated on Mar 08, 2024.

This page (Downloading and Flashing) was last updated on Mar 08, 2024.

Text editor powered by tinymce.