Getting Familiar

Microsoft MakeCode for Adafruit is a web-based code editor that provides a block editor, similar to Scratch or Code.org, and also a JavaScript editor for more advanced users.

If you'd like to learn more about MakeCode, this guide is a good place to start.

How to Upload Code

To upload code, first connect your Circuit Playground Express to your computer using a micro USB cable and press the small reset button in the center of the board. All the LEDs will flash red briefly, then turn green. Your computer should now show a removable drive called CPLAYBOOT. 

Click the Download button in the code window below to download the .uf2 file to your computer, and drag 'n drop that .UF2 file onto the CPLAYBOOT drive in your computer's file explorer or finder.

The drive will automatically eject itself (your computer may give you a "failed to eject drive correctly" error, you can ignore this). The code is now on your Circuit Playground Express and ready to run!

Use

Press button A for the project to run.

Extended Runtime

If you'd like your motor to spin for longer, it's easy to drag some extra pause blocks into your code. 

Exploring Inputs

MakeCode allows you to very quickly adapt a program to respond to different inputs.

Rather than using a button press to trigger the hand, you can set it to start moving when it detects movement, or when light, temperature, or noise levels change.

Motor Speed

Adjusting the speed of a continuous rotation servo can be accomplished by adjusting the potentiometer hidden inside the motor.

Take a small screwdriver and SLOWLY turn the potentiometer screw clockwise, then counter-clockwise, observing how this affects the speed and direction of the motor until you find a spot that works well for you.

Troubleshooting

Problem: My motor doesn't move!

Solution: Make sure that your Circuit Playground Express is connected to a power source (anywhere between 3V-5V is safe). If you're using a AAAx3 battery pack, check that the switch on the battery pack is set to "ON".

 

Problem: My Circuit Playground Express doesn't show up as CPLAYBOOT

Solutions:

  1. Be sure you have a Circuit Playground Express.  The Classic will not work with MakeCode.
  2. Some USB cables are "charge-only" and won't pass data. Try using a different USB cable and try using a different USB port on your computer.  
  3. With the Circuit Playground plugged into your computer with a micro USB cable, click the small reset button in the center of the board. The lights should all turn green. If they don't, try double-clicking the reset button.

If things still aren't working, head over to the Intro to Circuit Playground Express guide for more suggestions.

More MakeCode!

If you enjoy MakeCode and want to continue exploring you can check out lots more MakeCode projects on the Adafruit Learn System.

Want to Get Back to CircuitPython?

If you ever need to convert your Circuit Playground Express back to CircuitPython mode, you can do so by downloading the appropriate .UF2 file from CircuitPython.org and dragging it over onto your CPLAYBOOT drive. See this guide page for the step-by-step instructions.

This guide was first published on Mar 28, 2019. It was last updated on Mar 28, 2019.

This page (MakeCode) was last updated on Mar 16, 2021.

Text editor powered by tinymce.