Now it's time to upload some code!
Microsoft MakeCode for Adafruit is a web-based code editor for physical computing. It provides a block editor, similar to Scratch or Code.org, and also a JavaScript editor for more advanced users.
If you haven't used MakeCode before, this guide is a good place to start.
Before you move on...
...you will need to make sure you have the CRICKIT extension installed in MakeCode. Detailed instructions on how to do that can be found in this guide.
Once you've got that taken care of, get the Makecode below or via this link.
This code tells CRICKIT to move the servo motor 180 degrees if it hears a loud sound, and allows you to change the sensitivity to sound by changing the position of the slide switch.
Upload the Code
Connect the Circuit Playground Express to your computer with a micro USB cable.
If your CPX doesn't show up like a thumb drive on your computer within a few seconds, give the reset button in the middle a firm press. The LEDs should flash red and then go green. Voila! Check your Devices for a flash drive named CPLAYBOOT
Click Download in the MakeCode window, then navigate to the downloaded .uf2 file.
Drag and drop your .uf2 file onto the CPLAYBOOT drive. Like magic it will automatically update & eject itself. Your code is now on the Circuit Playground Express.
Page last edited March 08, 2024
Text editor powered by tinymce.