About

Welcome to the Microsoft MakeCode editor for the Adafruit Circuit Playground Express!

Circuit Playground Express

Check out the awesome hardware spec at Adafruit.com.

Adafruit Circuit Playground Express image

There are three Circuit Playground boards

Heads up! This editor only works for the Circuit Playground Express, not the Classic or Bluefruit.

Programming: Blocks or JavaScript

You can program the Adafruit Circuit Playground Express using Blocks or JavaScript in your web browser:

Blocks

input.buttonA.onEvent(ButtonEvent.Click, () => {
    light.showRing(`blue blue blue blue blue blue blue blue blue blue`)
})

JavaScript

input.buttonA.onEvent(ButtonEvent.Click, () => {
    light.showRing(`blue blue blue blue blue blue blue blue blue blue`)
})

The editor works in most modern browsers without needing any installation. Once loaded in the browser, it works while you’re offline too.

Compile and Flash: Your Program!

When you have your code ready, you connect your Adafruit Circuit Playground Express to a computer via a USB cable then press the reset button so it appears as a mounted drive (named CPLAYBOOT).

Compilation into machine code from Blocks or JavaScript happens in the browser. You save the binary program to a .uf2 file. You then copy the file to the CPLAYBOOT drive, which flashes the device with the new program.

Simulator: Test Your Code

You can run your code using the Adafruit Circuit Playground Express simulator, all within the confines of a web browser. The simulator has support for the LED pixels, buttons, as well as the accelerometer, light sensor, temperature sensor, and digital I/O pins.

forever(() => {
    light.showAnimation(light.rainbowAnimation, 1000)
})

Adafruit Daily Newsletter

Keep up with news about the Adafruit Circuit Playground Express and read about new projects and ideas in the MakeCode section of the Adafruit Daily newsletter.

light