# Cartoon Network MakeCode: Garnet's Gauntlets from Steven Universe

## Overview

![](https://cdn-learn.adafruit.com/assets/assets/000/070/251/medium800/makecode_CN_SU_LOGO_LOCKUP_RGB2x.png?1548804118)

https://www.youtube.com/watch?v=U-rPCCrC6pk&amp;feature=youtu.be

![](https://cdn-learn.adafruit.com/assets/assets/000/070/492/medium800/makecode_IMG_3831_2k.jpg?1549048053)

You can build your own set of Garnet's Gauntlets and power up for battle! Punch with your Circuit Playground Express enabled fist to get a light and sound reaction!

With MakeCode, you can program the Circuit Playground Express to do exactly what you want using the drag-and-drop, block-based interface right inside your web browser.

### Circuit Playground Express

[Circuit Playground Express](https://www.adafruit.com/product/3333)
 **Circuit Playground Express** is the next step towards a perfect introduction to electronics and programming. We've taken the original Circuit Playground Classic and made it even better! Not only did we pack even more sensors in, we also made it even easier to...

Out of Stock
[Buy Now](https://www.adafruit.com/product/3333)
[Related Guides to the Product](https://learn.adafruit.com/products/3333/guides)
![A Black woman's manicured hand holds a round microcontroller with lit up LEDs.](https://cdn-shop.adafruit.com/640x480/3333-05.jpg)

### Adafruit Circuit Playground Express or Bluefruit Enclosure

[Adafruit Circuit Playground Express or Bluefruit Enclosure](https://www.adafruit.com/product/3915)
We've got nice cases for many of our beloved boards, but the [Circuit Playground Express](https://www.adafruit.com/product/3333)&nbsp;and [Circuit Playground&nbsp;Bluefruit](https://www.adafruit.com/product/4333) has been left out of couture enclosure...

In Stock
[Buy Now](https://www.adafruit.com/product/3915)
[Related Guides to the Product](https://learn.adafruit.com/products/3915/guides)
![Top down view of a clear acrylic Adafruit Circuit Playground Express or Bluefruit Enclosure.](https://cdn-shop.adafruit.com/product-videos/640x480/3915-06.jpg)

### 3 x AAA Battery Holder with On/Off Switch, JST, and Belt Clip

[3 x AAA Battery Holder with On/Off Switch, JST, and Belt Clip](https://www.adafruit.com/product/3286)
This battery holder connects 3 AAA batteries together in series for powering all kinds of projects. We spec'd these out because the box is slim, and 3 AAA's add up to about 3.3-4.5V, a very similar range to Lithium Ion/polymer (Li-Ion) batteries, plus it has&nbsp;a nifty&nbsp;on-off...

In Stock
[Buy Now](https://www.adafruit.com/product/3286)
[Related Guides to the Product](https://learn.adafruit.com/products/3286/guides)
![Angled shot of 3 x AAA battery holder with on-off switch, JST PH connector, and belt clip.](https://cdn-shop.adafruit.com/640x480/3286-00.jpg)

### Alkaline AAA batteries - 3 pack

[Alkaline AAA batteries - 3 pack](https://www.adafruit.com/product/3520)
Battery power for your portable project! These batteries are good quality at a good price, and work fantastic with any of the kits or projects in the shop that use AAA's. This is a pack of **3 AAA batteries**.  
  
These batteries are Alkaline (MnO2) chemistry, with a...

In Stock
[Buy Now](https://www.adafruit.com/product/3520)
[Related Guides to the Product](https://learn.adafruit.com/products/3520/guides)
![Angled shot of 3 PKcell AAA batteries. ](https://cdn-shop.adafruit.com/640x480/3520-00.jpg)

### USB cable - USB A to Micro-B

[USB cable - USB A to Micro-B](https://www.adafruit.com/product/592)
This here is your standard A to micro-B USB cable, for USB 1.1 or 2.0. Perfect for connecting a PC to your Metro, Feather, Raspberry Pi or other dev-board or microcontroller

Approximately 3 feet / 1 meter long

In Stock
[Buy Now](https://www.adafruit.com/product/592)
[Related Guides to the Product](https://learn.adafruit.com/products/592/guides)
![USB cable - USB A to Micro-B - 3 foot long](https://cdn-shop.adafruit.com/640x480/592-01.jpg)

## Materials & Tools

In addition to the parts above, you'll also need:

- Sheets of colored craft foam
- Tacky glue
- Hot melt glue and hot glue gun
- Scissors or a hobby knife
- Ruler
- Cutting mat

![](https://cdn-learn.adafruit.com/assets/assets/000/070/252/medium800/makecode_IMG_3744_2k.jpg?1548804531)

# Cartoon Network MakeCode: Garnet's Gauntlets from Steven Universe

## Code the Star in MakeCode

## Getting Started with MakeCode

If you're new to MakeCode, [head to this guide to get started](https://learn.adafruit.com/makecode). Once you're familiar with MakeCode on&nbsp; your Circuit Playground Express, return here.

## Code Flow

We'll enhance the Gauntlet with a light and sound effect that reacts to punching. To do this we'll do these three things:

1. Set the NeoPixel ring of the Circuit Playground Express to moderately bright yellow.
2. Detect quick changes to the position of the Circuit Playground Express using the built-in accelerometer
3. Adjust the NeoPixels and play a sound effect when a punch motion is detected.

## On Start - Light

The first thing we'll do in our code is turn on the NeoPixels with a yellow color at moderately high brightness. To do this we'll use an `on start` block from the **LOOPS** category, and then place inside of it a `set brightness` block set to `120` and `set all pixels to` color block set to `yellow` from the **LIGHT** category.

![](https://cdn-learn.adafruit.com/assets/assets/000/070/351/medium800/makecode_mc_gaunt01.jpg?1549037912)

## On Shake - Flash

Detecting a punching motion is very easy in MakeCode -- we'll use the `on shake` block from the **INPUT** category.

When we detect the shake, we'll first have the NeoPixels turn bright white like a powerful flash! Add a `set brightness` block set to a value of `255` as well as a `set all pixels` block and change the color to `white`.

Here's a speed tip: Instead of getting these two block from the **LIGHT** category, you can copy the existing set of the same blocks from your `on start` block by right-clicking them and selecting **duplicate&nbsp;** from the pop-up menu!

![](https://cdn-learn.adafruit.com/assets/assets/000/070/352/medium800/makecode_mc_gaunt02.jpg?1549038486)

## Add Sound Effects

After the light flashes to bright white, we'll play a sound effect. You can use any of the pre-made `play sound __until done` block choices from the **MUSIC** category. Or make your own by using the `play tone at__ for __` blocks also from the **MUSIC** category as shown here. This allows us to craft our own unique sound effect!

![](https://cdn-learn.adafruit.com/assets/assets/000/070/353/medium800/makecode_mc_gaunt03.jpg?1549038829)

Primary: 

I set a repeating, trill-like pattern with short tone durations by duplicating the `play tone` block a few times, alternating between `3000` Hz and `2600` Hz, and setting the duration to `1/16 beat`. I set the final note to play for a `1/4 beat`.

Test out your sound while working on it by clicking the **SHAKE** button that appears on the top of the simulator Circuit Playground Express inside of MakeCode.

## Tempo in Beats per Minute

The sound effect plays back too quickly at first, so I decided to add a `set tempo to __ (bpm)` block from the **MUSIC** category into the `on start` block. After trying different values, I decided upon `60` bpm.

![](https://cdn-learn.adafruit.com/assets/assets/000/070/355/medium800/makecode_mc_gaunt04.jpg?1549039367)

## Back to Yellow

Finally, we want to return the NeoPixels to the original moderately bright yellow color. Add a `set brightness 120` and `set all pixels to yellow` block set to the bottom of the `on shake `block.

![](https://cdn-learn.adafruit.com/assets/assets/000/070/356/medium800/makecode_mc_gaunt05.jpg?1549039557)

You can take a look at the final code here:

[MakeCode final project](https://makecode.com/_f8y5CK7FwUa0)
Your code is complete! You can now download it and drag it onto your Circuit Playground Express and try it out on the real device! Power it up, give it a good shake, and watch and listen for the cool effects!

# Cartoon Network MakeCode: Garnet's Gauntlets from Steven Universe

## Make the Gauntlets

https://youtu.be/U-rPCCrC6pk

You can build your gauntlets from lots of different materials, including old coffee cans, cardboard tubes, felt, or even cardstock. We'll show you here one method using craft foam sheets.

Check out EPBOT for an [excellent tutorial on using craft foam for realistic cosplay bracers](https://www.epbot.com/2016/06/make-these-warrior-belle-leather.html)!

![](https://cdn-learn.adafruit.com/assets/assets/000/070/357/medium800/makecode_IMG_3744_2k.jpg?1549042351)

## Cuff Body

Create the cuff body by cutting one sheet of foam into an appropriate width and length -- here about 7" x 18". The short side will be the height of the cylinder, the long side will be the circumference.

Use tacky craft glue to form an adhesive strip along the edge of one length of the foam.

Roll the foam into a cylinder and press the edges together.

Place a weight on the seam to hold it in place while it dries. Note -- this can take a half hour or so to hold and up to 24 hours to fully cure! You may choose to use small dots of hot glue to tack it in place more quickly.

![makecode_IMG_3745_2k.jpg](https://cdn-learn.adafruit.com/assets/assets/000/070/358/medium640/makecode_IMG_3745_2k.jpg?1549042913)

![makecode_IMG_3746_2k.jpg](https://cdn-learn.adafruit.com/assets/assets/000/070/359/medium640/makecode_IMG_3746_2k.jpg?1549042923)

![makecode_IMG_3748_2k.jpg](https://cdn-learn.adafruit.com/assets/assets/000/070/360/medium640/makecode_IMG_3748_2k.jpg?1549042937)

## Rivets

&nbsp;

An alternate or additional way to secure the foam is with plastic pop rivets.

To use, poke a small hole with a scribe, awl, or pencil through the overlapping foam edges and then push the rivet through from the outside in.

Place the retaining ring over the back side to secure.

![makecode_IMG_3777_2k.jpg](https://cdn-learn.adafruit.com/assets/assets/000/070/361/medium640/makecode_IMG_3777_2k.jpg?1549043083)

![makecode_IMG_3778_2k.jpg](https://cdn-learn.adafruit.com/assets/assets/000/070/362/medium640/makecode_IMG_3778_2k.jpg?1549043091)

![makecode_IMG_3779_2k.jpg](https://cdn-learn.adafruit.com/assets/assets/000/070/363/medium640/makecode_IMG_3779_2k.jpg?1549043099)

![makecode_IMG_3780_2k.jpg](https://cdn-learn.adafruit.com/assets/assets/000/070/364/medium640/makecode_IMG_3780_2k.jpg?1549043107)

## Secure the Battery Pack

We'll hang the battery pack from it's belt clip on the inside of the gauntlet.

![](https://cdn-learn.adafruit.com/assets/assets/000/070/375/medium800/makecode_IMG_3763_2k.jpg?1549043437)

Cut two small slits in the foam near the middle of the gauntlet. This is where the Circuit Playground Express and star will be.

&nbsp;

Hook the belt clip through the slits.

&nbsp;

Route the battery cable through one of the slits to allow it to plug into the Circuit Playground Express later.

![makecode_IMG_3758_2k.jpg](https://cdn-learn.adafruit.com/assets/assets/000/070/365/medium640/makecode_IMG_3758_2k.jpg?1549043390)

![makecode_IMG_3762_2k.jpg](https://cdn-learn.adafruit.com/assets/assets/000/070/366/medium640/makecode_IMG_3762_2k.jpg?1549043408)

![makecode_IMG_3764_2k.jpg](https://cdn-learn.adafruit.com/assets/assets/000/070/377/medium640/makecode_IMG_3764_2k.jpg?1549043496)

![makecode_IMG_3765_2k.jpg](https://cdn-learn.adafruit.com/assets/assets/000/070/378/medium640/makecode_IMG_3765_2k.jpg?1549043504)

![](https://cdn-learn.adafruit.com/assets/assets/000/070/382/medium800/makecode_IMG_3766_2k.jpg?1549043521)

## CPX Case

To attach the Circuit Playground Express case to the cuff, we'll use a small foam strip through the case back.

![](https://cdn-learn.adafruit.com/assets/assets/000/070/408/medium800/makecode_IMG_3755_2k.jpg?1549044500)

Feed the strip through the strap cutouts in the case back.

&nbsp;

Place the Circuit Playground Express into the case.

&nbsp;

Make sure to align the slide switch positions of the case top and the CPX, then place the top of the case on, clicking it into place.

&nbsp;

Plug in the battery cable. (You'll use the battery case's on/off switch).

&nbsp;

Use tacky craft glue to adhere the strip to the gauntlet cuff.

&nbsp;

I used a few rulers and spring clamps to hold the strap in place while it dried. You could use some books for weights, or small dots of hot glue as well.

![makecode_IMG_3756_2k.jpg](https://cdn-learn.adafruit.com/assets/assets/000/070/393/medium640/makecode_IMG_3756_2k.jpg?1549044457)

![makecode_IMG_3757_2k.jpg](https://cdn-learn.adafruit.com/assets/assets/000/070/394/medium640/makecode_IMG_3757_2k.jpg?1549044457)

![makecode_IMG_3767_2k.jpg](https://cdn-learn.adafruit.com/assets/assets/000/070/395/medium640/makecode_IMG_3767_2k.jpg?1549044458)

![makecode_IMG_3768_2k.jpg](https://cdn-learn.adafruit.com/assets/assets/000/070/396/medium640/makecode_IMG_3768_2k.jpg?1549044458)

![makecode_IMG_3769_2k.jpg](https://cdn-learn.adafruit.com/assets/assets/000/070/397/medium640/makecode_IMG_3769_2k.jpg?1549044459)

![makecode_IMG_3771_2k.jpg](https://cdn-learn.adafruit.com/assets/assets/000/070/398/medium640/makecode_IMG_3771_2k.jpg?1549044460)

## Star

Now, we'll decorate the CPX case with a yellow star -- which will also act as a light diffuser.

Use scissors or a hobby knife to cut out a star from some yellow foam.

&nbsp;

Clue the star to the case top using a small dot of hot glue.

![makecode_IMG_3782_2k.jpg](https://cdn-learn.adafruit.com/assets/assets/000/070/419/medium640/makecode_IMG_3782_2k.jpg?1549045585)

![makecode_IMG_3785_2kb.jpg](https://cdn-learn.adafruit.com/assets/assets/000/070/424/medium640/makecode_IMG_3785_2kb.jpg?1549046197)

## Black Band

To match the style of the gauntlet, we'll add a strip of black foam around the bottom of the cuff. You can use a combination of glue and pop rivets to secure it.

![](https://cdn-learn.adafruit.com/assets/assets/000/070/430/medium800/makecode_IMG_3793_2k.jpg?1549046429)

![](https://cdn-learn.adafruit.com/assets/assets/000/070/456/medium800/makecode_IMG_3794_2k.jpg?1549046538)

## Support Base and Top

The craft foam on its own is a bit floppy, and will be very loose on your wrists. In order to address both issues, we'll use some foam core board to create a top and bottom of the cylinder with holes cut in their centers for your arm to fit through.

Trace the base perimeter onto the foam core board with a pencil.

&nbsp;

Use a hobby knife to cut it out.

&nbsp;

Trim the edges so it fits well inside the gauntlet cuff.

&nbsp;

Cut out an oval from the center that will allow your arm to fit inside.

&nbsp;

Repeat this for the top board by tracing the first one.

&nbsp;

Glue both in place with a thin bead of hot glue.

![makecode_IMG_3804_2k.jpg](https://cdn-learn.adafruit.com/assets/assets/000/070/425/medium640/makecode_IMG_3804_2k.jpg?1549046327)

![makecode_IMG_3806_2k.jpg](https://cdn-learn.adafruit.com/assets/assets/000/070/469/medium640/makecode_IMG_3806_2k.jpg?1549046889)

![makecode_IMG_3809_2k.jpg](https://cdn-learn.adafruit.com/assets/assets/000/070/470/medium640/makecode_IMG_3809_2k.jpg?1549046606)

![makecode_IMG_3811_2k.jpg](https://cdn-learn.adafruit.com/assets/assets/000/070/471/medium640/makecode_IMG_3811_2k.jpg?1549046608)

![makecode_IMG_3813_2k.jpg](https://cdn-learn.adafruit.com/assets/assets/000/070/472/medium640/makecode_IMG_3813_2k.jpg?1549046615)

![makecode_IMG_3812_2k.jpg](https://cdn-learn.adafruit.com/assets/assets/000/070/473/medium640/makecode_IMG_3812_2k.jpg?1549046623)

![makecode_IMG_3814_2k.jpg](https://cdn-learn.adafruit.com/assets/assets/000/070/474/medium640/makecode_IMG_3814_2k.jpg?1549046631)

![makecode_IMG_3819_2k.jpg](https://cdn-learn.adafruit.com/assets/assets/000/070/475/medium640/makecode_IMG_3819_2k.jpg?1549046641)

![makecode_IMG_3815_2k.jpg](https://cdn-learn.adafruit.com/assets/assets/000/070/476/medium640/makecode_IMG_3815_2k.jpg?1549046653)

## Decorate

Add more foam decorations as you like!

![](https://cdn-learn.adafruit.com/assets/assets/000/070/486/medium800/makecode_IMG_3820_2k.jpg?1549046749)

![](https://cdn-learn.adafruit.com/assets/assets/000/070/487/medium800/makecode_IMG_3821_2k.jpg?1549046754)

## Power Up your Gauntlet!

It's time to put your Garnet's Gauntlet to use! Turn on the battery pack's on/off switch. Then pull on your gauntlet and deliver a strong air-punch!

![](https://cdn-learn.adafruit.com/assets/assets/000/070/488/medium800/makecode_IMG_3829_2k.jpg?1549047572)

![](https://cdn-learn.adafruit.com/assets/assets/000/070/489/medium800/makecode_IMG_3831_2k.jpg?1549047588)

![](https://cdn-learn.adafruit.com/assets/assets/000/070/490/medium800/makecode_IMG_3833_2k.jpg?1549047593)

You can even dress it up with a red glove or even add additional foam cutouts if you like.

![](https://cdn-learn.adafruit.com/assets/assets/000/070/491/medium800/makecode_IMG_3853_2kbeauty.jpg?1549048028)


## Featured Products

### Circuit Playground Express

[Circuit Playground Express](https://www.adafruit.com/product/3333)
 **Circuit Playground Express** is the next step towards a perfect introduction to electronics and programming. We've taken the original Circuit Playground Classic and made it even better! Not only did we pack even more sensors in, we also made it even easier to...

Out of Stock
[Buy Now](https://www.adafruit.com/product/3333)
[Related Guides to the Product](https://learn.adafruit.com/products/3333/guides)
### Adafruit Circuit Playground Express or Bluefruit Enclosure

[Adafruit Circuit Playground Express or Bluefruit Enclosure](https://www.adafruit.com/product/3915)
We've got nice cases for many of our beloved boards, but the [Circuit Playground Express](https://www.adafruit.com/product/3333)&nbsp;and [Circuit Playground&nbsp;Bluefruit](https://www.adafruit.com/product/4333) has been left out of couture enclosure...

In Stock
[Buy Now](https://www.adafruit.com/product/3915)
[Related Guides to the Product](https://learn.adafruit.com/products/3915/guides)
### 3 x AAA Battery Holder with On/Off Switch, JST, and Belt Clip

[3 x AAA Battery Holder with On/Off Switch, JST, and Belt Clip](https://www.adafruit.com/product/3286)
This battery holder connects 3 AAA batteries together in series for powering all kinds of projects. We spec'd these out because the box is slim, and 3 AAA's add up to about 3.3-4.5V, a very similar range to Lithium Ion/polymer (Li-Ion) batteries, plus it has&nbsp;a nifty&nbsp;on-off...

In Stock
[Buy Now](https://www.adafruit.com/product/3286)
[Related Guides to the Product](https://learn.adafruit.com/products/3286/guides)
### Alkaline AAA batteries - 3 pack

[Alkaline AAA batteries - 3 pack](https://www.adafruit.com/product/3520)
Battery power for your portable project! These batteries are good quality at a good price, and work fantastic with any of the kits or projects in the shop that use AAA's. This is a pack of **3 AAA batteries**.  
  
These batteries are Alkaline (MnO2) chemistry, with a...

In Stock
[Buy Now](https://www.adafruit.com/product/3520)
[Related Guides to the Product](https://learn.adafruit.com/products/3520/guides)
### USB cable - USB A to Micro-B

[USB cable - USB A to Micro-B](https://www.adafruit.com/product/592)
This here is your standard A to micro-B USB cable, for USB 1.1 or 2.0. Perfect for connecting a PC to your Metro, Feather, Raspberry Pi or other dev-board or microcontroller

Approximately 3 feet / 1 meter long

In Stock
[Buy Now](https://www.adafruit.com/product/592)
[Related Guides to the Product](https://learn.adafruit.com/products/592/guides)
### Plastic Pop Rivets for Cardboard Crafts (20-pack)

[Plastic Pop Rivets for Cardboard Crafts (20-pack)](https://www.adafruit.com/product/3822)
Enter the world of cardboard construction and build playful robot friends!&nbsp;

Instead of slapping on tape or waiting for your hot glue to warm up, you can use these **Large Plastic Rivets**! So easy to install. Just poke them through the cardboard and fasten with the back...

No Longer Stocked
[Buy Now](https://www.adafruit.com/product/3822)
[Related Guides to the Product](https://learn.adafruit.com/products/3822/guides)
### Adafruit + Cartoon Network Cosplay Introductory Kit

[Adafruit + Cartoon Network Cosplay Introductory Kit](https://www.adafruit.com/product/4355)
Are you interested in making cosplay and Halloween projects&nbsp;with a Circuit Playground Express,&nbsp;but overwhelmed with what to buy? Better yet, do you love Cartoon Network characters and shows?

Here's a beginner&nbsp;pack to get started, no matter your skill level.&nbsp;This...

No Longer Stocked
[Buy Now](https://www.adafruit.com/product/4355)
[Related Guides to the Product](https://learn.adafruit.com/products/4355/guides)
### Adafruit + Cartoon Network Cosplay Basics Kit

[Adafruit + Cartoon Network Cosplay Basics Kit](https://www.adafruit.com/product/4358)
Are you interested in making cosplay and Halloween projects&nbsp;with a Circuit Playground Express,&nbsp;but overwhelmed with what to buy? Better yet, do you love Cartoon Network characters and shows?

Here's a intermediary pack to get started, no matter your skill level.&nbsp;This...

No Longer Stocked
[Buy Now](https://www.adafruit.com/product/4358)
[Related Guides to the Product](https://learn.adafruit.com/products/4358/guides)

## Related Guides

- [Adafruit Circuit Playground Express](https://learn.adafruit.com/adafruit-circuit-playground-express.md)
- [Circuit Playground Express Serial Communications](https://learn.adafruit.com/circuit-playground-express-serial-communications.md)
- [Cosplay Floating LED Fireball with Motion Sensing](https://learn.adafruit.com/cosplay-fireball-prop-with-motion-sensing.md)
- [Circuit Playground Express Treasure Hunt](https://learn.adafruit.com/circuit-playground-treasure-hunt.md)
- [Magical Cardboard Craft Obsidian Sword](https://learn.adafruit.com/cardboard-obsidian-sword.md)
- [Crickit Powered Mini Chair Swing Ride!](https://learn.adafruit.com/mini-chair-swing-ride.md)
- [Porting an Arduino library to CircuitPython: VL6180X Distance Sensor](https://learn.adafruit.com/porting-an-arduino-library-to-circuitpython-vl6180x-distance-sensor.md)
- [Soil Moisture Sensor with Circuit Playground Express and MakeCode](https://learn.adafruit.com/soil-moisture-sensor-with-circuit-playground-express.md)
- [Cardboard Circuit Playground Express Inchworm Robot](https://learn.adafruit.com/cardboard-robot-inchworm.md)
- [Motorized Grinch Fireplace](https://learn.adafruit.com/grinch-fireplace.md)
- [AdaBox 014](https://learn.adafruit.com/adabox014.md)
- [Buttermilk Boat with Circuit Playground Express](https://learn.adafruit.com/boat-with-circuit-playground-express.md)
- [Halloween Sentry-Bot with CRICKIT for CPX](https://learn.adafruit.com/halloween-sentry-bot.md)
- [Desktop Dumpster Fire](https://learn.adafruit.com/desktop-dumpster-fire.md)
- [How to Program SAMD Bootloaders](https://learn.adafruit.com/how-to-program-samd-bootloaders.md)
- [Adafruit seesaw](https://learn.adafruit.com/adafruit-seesaw-atsamd09-breakout.md)
