MakeCode for Adafruit Boards

MakeCode is an easy-to-use block-based programming editor that runs in the Google Chrome web browser. It’s has an intuitive interface and features lots of examples and demos.

LED Hockey Puck Code

If you are using the Circuit Playground Express, which uses, click the button below.

If you are using the Circuit Playground Bluefruit, which uses, click the button below.

Pair Device and Upload

Once you have the MakeCode program open, click the edit button on the top right to open it in a new MakeCode project.

The code blocks and simulator will be ready to modify. Let's get the device paired with WebUSB.

  1. Click on the Gear icon, at the top right.
  2. Select Pair Device from the dropdown.
  3. For the Circuit Playground Express, Click on CPlay Express and Connect. For the Circuit Playground Bluefruit, click your device and click Pair Device.
  4. Click the big blue Download button to upload the code.

MakeCode Blocks

on start

if true then

  • while true do show animation (rainbow)

if button B is pressed then

while true do

  • show animation (purple fireball) for 2ms

else if

  • button A is pressed then
    • stop all animations 
    • while button A is press do
      • show animation (blue chase) for 5000ms

on button A click

  • stop all animations
  • While button A was pressed do
    • show animation (blue chase color) for 5000 ms

on face down

stop all animations

  • run in parallel
    • show animation (red orange color) for 5000 ms
    • play melody (falling)

on 2g (step)

  • play sound (pew pew)
  • stop all animation
  • show animation (sparkle)

on button A+B click

  • reset

This guide was first published on Dec 23, 2020. It was last updated on Dec 23, 2020.

This page (MakeCode) was last updated on May 13, 2022.

Text editor powered by tinymce.