MakeCode for Adafruit Boards
MakeCode Maker 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.
The Maker version works with supported Adafruit boards, so you can make interactive projects with a wide selection of microcontroller boards.
NeoPixel Mickey Ear Code
Click the links below to launch the code in maker.makecode.com. The GEMMA M0 version uses the tilt-ball switch.
GEMMA M0 MakeCode
A NeoPixel strip is created with the set strip block. It's set to pin D0 with 60 pixels. The strip brightness block tells the strip how bright to glow on start. An on touch block is used to detect when a pin is triggered.
When the tilt-ball switch is triggered on pin D1, the LED flash animation will run for a few seconds. In the forever loop, several light blocks are setup to cycle through animations for a few seconds each.
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 GEMMA M0, code blocks and simulator will be ready to modify. Let's get the device paired with WebUSB.
- Click on the Gear icon, at the top right.
- Select Pair Device from the dropdown.
- Click on GEMMA M0 and Connect.
- Click the big blue Download button to upload the code.
Testing Code
The NeoPixel LED strips and tilt-ball switch should be wired up to the GEMMA M0. If you haven't already, take a moment to do so now. Shaking the tilt-ball should trigger the flashing LED animation. The rainbow and chasing animations are programmed to loop until touch is detected on Pin D1.
The Maker version of MakeCode supports lots of boards from Adafruit and the open source community. In your MakeCode program, click on the gear icon and select change board. Take a moment to browse the support boards, there's a great selection!
Any supported board from Adafruit can pair with the device via WebUSB so it’s easy to connect.
You can also share the code and download it from any computer using the Chrome browser.
With the GEMMA M0, you can hook up a strip of NeoPixels using alligator clips which is nice because you don’t need to solder.
Page last edited March 08, 2024
Text editor powered by tinymce.