# Glowing Slime Lunchbox

## Overview

https://youtu.be/jVGjd4DIsm8

## DIY Slime for Science!

This classic do it yourself project is a great little science experiment that promotes STEM and STEAM education. This project has gain lots of traction and seems to be an ever growing trend. There's hundreds of videos and tutorials showing how to make different variants from majestic unicorn poop to cosmic galaxy glitter. This might be only one with LEDs!

## Slime TRONICS

You've heard of glow-in-the-dark slime, but what about Light Up NeoPixel slime! The florescent colors of slim combined with an ultra violet light source can make for some interesting effects. It's also (somewhat) conductive so it can be used to make projects with capacitive touch!

## Tools & Supplies

Most of the ingredients to make slime can be found at your local shopping market but maybe you have some on hand! The original recipe calls for a mixture of baking soda and contact fluid but Elmer's now has a pre-made solution called [Magic Liquid](http://a.co/08KI4aH) that is specially made to make slime.

![projects_slime-parts.jpg](https://cdn-learn.adafruit.com/assets/assets/000/055/265/medium640/projects_slime-parts.jpg?1528685971)

## Prerequisite Guides

There's resources in these guides that go beyond what's covered in this tutorial. MakeCode guide is all about setting up your Circuit Playground Express board. TheCircuit Playground Express introduction guide walks you through all of the pinouts, sensors and everything you need to know.

- [MakeCode for Circuit Playground Express](https://learn.adafruit.com/makecode)
- [Introducing Circuit Playground Express](https://learn.adafruit.com/adafruit-circuit-playground-express)

### Part: Elmer's Glowy Glitter Glue
quantity: 1
Clear, Glitter or Florescent colored
[Elmer's Glowy Glitter Glue](http://a.co/0GESFBw)

### Part: Elmer's Magic Liquid
quantity: 1
Pre-made Solution. Washable, non-toxic and safe
[Elmer's Magic Liquid](http://a.co/08KI4aH)

These are some handy things to have when mixing and handing slime.

- Mixing Bowl
- Paper Towels
- Ziplock Bags
- Decorations: glitter, sequins, beads or confetti
- 3xAAA Batteries

### 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...

In 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)

### 3 x AAA Battery Holder with On/Off Switch and 2-Pin JST

[3 x AAA Battery Holder with On/Off Switch and 2-Pin JST](https://www.adafruit.com/product/727)
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 and have an on-off switch. That makes...

In Stock
[Buy Now](https://www.adafruit.com/product/727)
[Related Guides to the Product](https://learn.adafruit.com/products/727/guides)
![Front angled shot of 3 x AAA battery holder with on-off switch and 2-pin JST PH connector.](https://cdn-shop.adafruit.com/640x480/727-07.jpg)

### AdaBot LunchBox

[AdaBot LunchBox](https://www.adafruit.com/product/3437)
Your eyes do not deceive you –&nbsp;this is **_absolutely_** an AdaBot lunchbox! Whether you're sporting this at school, work, Maker Faire, or jury duty, this beautiful, shiny blue lunchbox is guaranteed to turn some heads.

Fill it up with your favorite edible goodies...

In Stock
[Buy Now](https://www.adafruit.com/product/3437)
[Related Guides to the Product](https://learn.adafruit.com/products/3437/guides)
![Friendly robot AdaBot Lunch Box](https://cdn-shop.adafruit.com/640x480/3437-00.jpg)

### Adafruit NeoPixel LED Strip w/ Alligator Clips - 60 LED/m

[Adafruit NeoPixel LED Strip w/ Alligator Clips - 60 LED/m](https://www.adafruit.com/product/3811)
Adding glowy color to your projects has never been easier: no more soldering or stripping wires, clip 'em on and glow! This **Adafruit NeoPixel LED Strip with Alligator Clips** has **30 total LEDs** in a **"60 LED per meter" spacing** , and...

In Stock
[Buy Now](https://www.adafruit.com/product/3811)
[Related Guides to the Product](https://learn.adafruit.com/products/3811/guides)
![Adafruit NeoPixel LED 0.5 meter Strip with Alligator Clips wired to Circuit Playground, lighting up rainbow](https://cdn-shop.adafruit.com/product-videos/640x480/3811-06.jpg)

### Adafruit NeoPixel LED Strip w/ Alligator Clips - 30 LEDs/meter

[Adafruit NeoPixel LED Strip w/ Alligator Clips - 30 LEDs/meter](https://www.adafruit.com/product/3812)
Adding glowy color to your projects has never been easier: no more soldering or stripping wires, clip 'em on and glow! This **Adafruit NeoPixel LED Strip with Alligator Clips** has **30 total LEDs in a "30 LED per meter" spacing** , and is 1 meter long,...

In Stock
[Buy Now](https://www.adafruit.com/product/3812)
[Related Guides to the Product](https://learn.adafruit.com/products/3812/guides)
![Adafruit NeoPixel LED 1 meter Strip with Alligator Clips wired to Circuit Playground, lighting up rainbow](https://cdn-shop.adafruit.com/product-videos/640x480/3812-06.jpg)

### Adafruit NeoPixel UV LED Strip with 32 LED/m

[Adafruit NeoPixel UV LED Strip with 32 LED/m](https://www.adafruit.com/product/3851)
What new iteration of NeoPixel strip is this? Roll out the black light and disco ball! It's an **Adafruit NeoPixel** &nbsp; **Ultraviolet**** &nbsp;Strip with 32 LEDs per meter**! Each order comes as a single one meter long strip. If you order multiple...

In Stock
[Buy Now](https://www.adafruit.com/product/3851)
[Related Guides to the Product](https://learn.adafruit.com/products/3851/guides)
![Adafruit NeoPixel UV LED Strip flickering all LEDS](https://cdn-shop.adafruit.com/product-videos/640x480/3851-03.jpg)

![](https://cdn-learn.adafruit.com/assets/assets/000/055/267/medium800/projects_slime-box-hero.jpg?1528686028)

# Glowing Slime Lunchbox

## Circuit Diagram

![](https://cdn-learn.adafruit.com/assets/assets/000/055/261/medium800/projects_diagram.jpg?1528662541)

## Circuit&nbsp;Diagram

This provides a visual reference for wiring of the components. They aren't true to scale, just meant to be used as reference. The NeoPixel strip features alligator clips that connect directly to the pads on the Circuit Playground Express.

## Power Pack

The 3xAAA battery pack can supply ~4.5V which is suffice to power the Circuit Playground Express and 30 count NeoPixel strip. The battery plugs directs into the JST connector. Optionally power over 5V USB hub like computer or charger from&nbsp; mobile devices.

## Wired Connections

The following connections are setup for the program in MakeCode. The data input from the NeoPixel can be switched to any available pins (except for A0 but OK on A1-A7 ) on the Circuit Playground.&nbsp;

- **GND** from NeoPixel strip to **GND** on Circuit Playground Express
- **DIN** from NeoPixel strip to **A1** on&nbsp;Circuit Playground Express
- **5V** from NeoPixel strip to **VOUT** on&nbsp;Circuit Playground Express

[diagram.fzz](https://cdn-learn.adafruit.com/assets/assets/000/055/390/original/diagram.fzz?1528830021)
## Made in Fritzing

You can download the diagram and modify the connections or repurpose the components to make new diagrams! This was made in Fritzing, it's open source software designed to make electronics design easy, check it out.&nbsp;[http://fritzing.org/download/](Fritzing)

# Glowing Slime Lunchbox

## MakeCode

![](https://cdn-learn.adafruit.com/assets/assets/000/055/264/medium800/projects_cpx-slime-hero.jpg?1528673820)

## Setup Circuit Playground Express for MakeCode

MakeCode is a block based language that makes it easy to program the Circuit Playground Express. You can drag and drop code blocks to make things light up. To get started, we'll need to head over to the [Adafruit MakeCode](https://makecode.adafruit.com/) website and follow the steps below.

1. Plug in your Circuit Playground Express with a **USB Cable**
2. Press the **RESET** &nbsp;button. Green light means you're ready to MakeCode
3. Download the **UF2** file and drop it onto **CPLAYBOOT**.

[Launch Adafruit MakeCode Website](https://makecode.adafruit.com/beta?webusb=1#editor)
![](https://cdn-learn.adafruit.com/assets/assets/000/055/251/medium800/projects_cpx-makecode-setup.jpg?1528645464)

## LunchBox with Motion Activated NeoPixels

When the lunchbox is opened, a strip of NeoPixel flash on/off and a Power Up sound effect is triggered. Then, the NeoPixels on the Circuit Playground Express sparkle after the NeoPixel strip flashes.&nbsp;

## How's does this work?

The accelerometer on the Circuit Playground Express can detect when it's facing up and down. In the code, we can tell the NeoPixel LEDs to flash on and off when the Circuit Playground is facing up. We can also add sound effects and animate the on-board NeoPixels.

## LunchBox Code

The full program is available to download and modify. Click the Adafruit flower logo in the top left to open in a new window. There you can play with the Circuit Playground simulator, modify code blocks and upload code.&nbsp;

Below the code embed is a step by step breakdown of the program. Read through it to get an idea of how to build this program, block by block. If you get stuck, re-read the steps and reference the guide.

[Click to open up the MakeCode editor with code for this project!](https://makecode.com/_bo0bHiRMT196)
## How To Connect NeoPixel Strip to Circuit Playground Express

We need to setup the neopixel strip by assigning it to a pin on the Circuit Playground. We can do this by creating a variable, setting up a strip and configuring which pin it's on and how many pixels are in the strip.

1. Drag and drop an **On Start** block from the **Loops** menu onto the canvas.
2. Create a variable called " **strip**" using the " **Make Variable**" button in the **Variables** menu.
3. Click on the " **Light**" menu and click the " **NeoPixel"** submenu.
4. Drag the "**Set [strip] to create strip**" block into the **On Start** block.
  1. Click the plus( **+** ) button and select **A1**
  2. Click the plus( **+** ) button again and type in **30** (the number of pixels in our strip)

5. Drag and drop a **Strip Set Brightness** block from the NeoPixel submenu to the bottom of the Set Strip block. Type in desired brightness (255 is max).

## Making Things Light Up

Now that we have our external neopixel strip setup, we can start programming events to trigger animations and sound effects. Let's think about how we can do this. In this project, we placed the Circuit Playground inside the lid of the lunchbox. So when the cover is open, the board is facing up and when it's closed, it's facing down.

1. Drag and drop " **On Shake**" block from the **Input** menu onto the canvas.
2. Click the " **Shake**" option to open the dropdown and choose " **Face Up**".
3. Drag and drop "**[Strip] set all pixels to [color]**" into the " **On Face Up**" block.
  1. Choose a color by clicking on the color box and picking from the swatches.

4. Drag and drop "**play sound [power up]**" into the " **On face up**" block.
  1. Choose a sound effect by clicking on the dropdown picker.

5. Download code and test!

When the board is facing up, it should light up the strip of neopixels and play a sound. That's great, but how do we get the lights to flash on and off?

## Using Loops for Flashing Lights

In order to flash the NeoPixels on and off, we'll need to create a repeat block and loop between turning the pixels black and white (or in this case, on and off).

1. Drag and drop "**repeat [4] times**" block from the " **Loops**" menu onto the canvas.
2. Insert a "**[strip] set all pixels to color**" block into the "**repeat [4] times**" block.
  1. Choose the color black

3. Drag and drop "**pause [100]ms**" block from the " **Loops**" menu below the " **strip set all pixels**" block.
  1. Type in or choose the value " **100**".

4. Right click on the "**[strip] set all pixels to color**" block and choose duplicate.
  1. Place below the " **pause**" block
  2. Change the color to something other than black.

5. Add another " **pause**" block to the bottom of the second " **strip set all pixels**" block.

And now we have a repeat block that we can insert into our " **Face Up**" block. You'll want to replace the first " **strip set all pixels**" block with our " **repeat**" block.

## Adjust, Remix and Modify

You easily change up the options in the various blocks to make new events and triggers! Why not change **on&nbsp;face up** to **on shake**? Now you can shake the launch box to make lights or sounds! Add an on face down block to make it do other things when the lunchbox is closed! The options and combinations are enormous so start experimenting!

![](https://cdn-learn.adafruit.com/assets/assets/000/055/268/medium800/projects_slime-tone-2.jpg?1528686356)

# Glowing Slime Lunchbox

## Make Slime

![](https://cdn-learn.adafruit.com/assets/assets/000/055/276/medium800thumb/projects_pink-slime-loop.jpg?1528730763)

## Magicial Liquid

&nbsp;

Now let's move on to making a batch of slime! We found the easiest recipe use's Elmer's Magical Liquid.

&nbsp;

This mixture is a combination of contact lens solution and backing soda. This makes it easier to make slime without having to worry about measuring several ingredients.&nbsp; Less mess too!

&nbsp;

The bottle has measuring markers on side so you can reference how much to use in a given batch.

![projects_mixing-parts.jpg](https://cdn-learn.adafruit.com/assets/assets/000/055/277/medium640/projects_mixing-parts.jpg?1528730840)

![projects_bottle-measure.jpg](https://cdn-learn.adafruit.com/assets/assets/000/055/278/medium640/projects_bottle-measure.jpg?1528730857)

## Mix Glue

The instructions listed on the bottle state the use of 4oz, 5oz and 6oz glue bottles can make a single batch using 1/4 cup of magical liquid. Take your bottle of glue and dump the contents into the mixing bowl. You can tap the bottom of the bottle if you squeezing doesn't get it all out. Then, slowly pour the magical liquid into the glue a little at a time. Use your fingers to mix them together. Swirling the contents together help with blending.&nbsp;

Take the slime out of the mixing bowl and knead with both hands. You'll want to do this until the slime has a stretchy consistency.&nbsp;&nbsp;

If it's too sticky, you can add a small amount of magical liquid to even it out. Continue to knead the mixture with both hands but a third hand is very helpful if you get stuck!

Be mindful with the magical liquid. If you add too much, it the slime slightly hardens, becomes more tough and less stretchy. Our ideal mixture is slightly sticky, very goopy and stretchy.&nbsp;

Continue to knead until it reaches your desired consistency.

## Add&nbsp;bedazzle

&nbsp;

To make our slime more colorful and textured, you can toss in decorations like beads, glitter, sequins and other bedazzles.

&nbsp;

Try to avoid adding things that might be pointy and sharp. We added these little star flakes to our mix and didn't realize they were actually kinda sharp. It won't cut but might scrape a finger or two!

&nbsp;

If you more slime that's fluffy and more "airy", try adding some shaving cream.

&nbsp;

&nbsp;

&nbsp;

&nbsp;

![projects_add-bedazzle.jpg](https://cdn-learn.adafruit.com/assets/assets/000/055/283/medium640/projects_add-bedazzle.jpg?1528731357)

![projects_glue-additives.jpg](https://cdn-learn.adafruit.com/assets/assets/000/055/284/medium640/projects_glue-additives.jpg?1528731390)

![](https://cdn-learn.adafruit.com/assets/assets/000/055/286/medium800/projects_glue-mix-storeB.jpg?1528731580)

## Store Slime

To extend the life of you slime, we'll want to store our slime in an air tight container or ziplock bags. Slime will dry if left out after a day.&nbsp;

# Glowing Slime Lunchbox

## Setup Lunchbox

![](https://cdn-learn.adafruit.com/assets/assets/000/055/272/medium800/projects_box-divider.jpg?1528730627)

## Dividers

We designed these 2x3 dividers to be cut out of chipboard material. Our SVG files can be used on a laser cutter, cutting machine (like Cricut or Silhouette) or even 3D printed. Use a [medium weight chipboard](http://a.co/7NMQbsf), it's about 1.6mm thick.

If you use a different material, make sure to measure the thickness. You may need to update the "slits" in the dividers to accommodate the materials thickness. The slits should be the same size as the material.

![](https://cdn-learn.adafruit.com/assets/assets/000/055/273/medium800/projects_box-btm-insert.jpg?1528730663)

## Bottom Liners

The bottom of the lunchbox is lined with a chipboard cutout that covers up the bottom. This helps keep the lunchbox clean in case things spill over. We used the same material as the dividers. You can also cutout the design out of foil card stock or patterned&nbsp; scrapbooking paper.

[Download Design – Fusion 360 Source](https://a360.co/2y48joO)
[Download SVG File](https://cdn-learn.adafruit.com/assets/assets/000/055/291/original/lbox-div-pack.svg?1528739811)
![](https://cdn-learn.adafruit.com/assets/assets/000/055/274/medium800/projects_box-strip-insert.jpg?1528730695)

## Install NeoPixel Strip

A NeoPixel strip can be lined along the inside of the lunchbox. Place the strip down with the LEDs facing inwards. Spread the strip so it's right up against the walls of the lunchbox. The strip is insulated with a silicone sheathing that proves grip so it holds together.

![](https://cdn-learn.adafruit.com/assets/assets/000/055/275/medium800/projects_box-cpx-taced.jpg?1528730712)

## Secure Circuit Playground

Use a bit of mounting tack to stick the circuit playground onto the inside of the cover. It looks great in the center of adabot's chest.

## Install Battery Pack

Use another piece of mounting tack to secure the battery pack holder next to the circuit playground. Make sure the switch is facing up and accessible.


## 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...

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

[3 x AAA Battery Holder with On/Off Switch and 2-Pin JST](https://www.adafruit.com/product/727)
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 and have an on-off switch. That makes...

In Stock
[Buy Now](https://www.adafruit.com/product/727)
[Related Guides to the Product](https://learn.adafruit.com/products/727/guides)
### AdaBot LunchBox

[AdaBot LunchBox](https://www.adafruit.com/product/3437)
Your eyes do not deceive you –&nbsp;this is **_absolutely_** an AdaBot lunchbox! Whether you're sporting this at school, work, Maker Faire, or jury duty, this beautiful, shiny blue lunchbox is guaranteed to turn some heads.

Fill it up with your favorite edible goodies...

In Stock
[Buy Now](https://www.adafruit.com/product/3437)
[Related Guides to the Product](https://learn.adafruit.com/products/3437/guides)
### Adafruit NeoPixel LED Strip w/ Alligator Clips - 60 LED/m

[Adafruit NeoPixel LED Strip w/ Alligator Clips - 60 LED/m](https://www.adafruit.com/product/3811)
Adding glowy color to your projects has never been easier: no more soldering or stripping wires, clip 'em on and glow! This **Adafruit NeoPixel LED Strip with Alligator Clips** has **30 total LEDs** in a **"60 LED per meter" spacing** , and...

In Stock
[Buy Now](https://www.adafruit.com/product/3811)
[Related Guides to the Product](https://learn.adafruit.com/products/3811/guides)
### Small Alligator Clip Test Lead (set of 12)

[Small Alligator Clip Test Lead (set of 12)](https://www.adafruit.com/product/1008)
Connect this to that without soldering using these handy mini alligator clip test leads. 15" cables with alligator clip on each end, color coded. You get 12 pieces in 6 colors. Strong and grippy, these always come in handy! We often use these in conjunction with a multimeter so we...

Out of Stock
[Buy Now](https://www.adafruit.com/product/1008)
[Related Guides to the Product](https://learn.adafruit.com/products/1008/guides)
### Adafruit NeoPixel LED Strip w/ Alligator Clips - 30 LEDs/meter

[Adafruit NeoPixel LED Strip w/ Alligator Clips - 30 LEDs/meter](https://www.adafruit.com/product/3812)
Adding glowy color to your projects has never been easier: no more soldering or stripping wires, clip 'em on and glow! This **Adafruit NeoPixel LED Strip with Alligator Clips** has **30 total LEDs in a "30 LED per meter" spacing** , and is 1 meter long,...

In Stock
[Buy Now](https://www.adafruit.com/product/3812)
[Related Guides to the Product](https://learn.adafruit.com/products/3812/guides)
### Adafruit NeoPixel UV LED Strip with 32 LED/m

[Adafruit NeoPixel UV LED Strip with 32 LED/m](https://www.adafruit.com/product/3851)
What new iteration of NeoPixel strip is this? Roll out the black light and disco ball! It's an **Adafruit NeoPixel** &nbsp; **Ultraviolet**** &nbsp;Strip with 32 LEDs per meter**! Each order comes as a single one meter long strip. If you order multiple...

In Stock
[Buy Now](https://www.adafruit.com/product/3851)
[Related Guides to the Product](https://learn.adafruit.com/products/3851/guides)

## Related Guides

- [Adafruit Circuit Playground Express](https://learn.adafruit.com/adafruit-circuit-playground-express.md)
- [Circuit Playground Hourglass](https://learn.adafruit.com/circuit-playground-hourglass.md)
- [LED Breath Stats Mask](https://learn.adafruit.com/led-breath-stats-mask.md)
- [Interactive Map with Circuit Playground Express](https://learn.adafruit.com/interactive-map-with-cpx.md)
- [CircuitPython Essentials](https://learn.adafruit.com/circuitpython-essentials.md)
- [Using DS18B20 Temperature Sensor with CircuitPython](https://learn.adafruit.com/using-ds18b20-temperature-sensor-with-circuitpython.md)
- [Circuit Playground Express Automatic Sunglasses](https://learn.adafruit.com/circuit-playground-express-auto-sunglasses.md)
- [Con Badge with Circuit Playground Express](https://learn.adafruit.com/circuit-playground-express-con-badge.md)
- [Secret Hollow Book Intrusion Detector](https://learn.adafruit.com/secret-hollow-book.md)
- [Circuit Playground Express Laser Tag](https://learn.adafruit.com/circuit-playground-express-laser-tag.md)
- [Giant Mechanical Keyboard](https://learn.adafruit.com/giant-control-alt-delete.md)
- [AdaBox 008](https://learn.adafruit.com/adabox008.md)
- [Mason Jar Snow Globe](https://learn.adafruit.com/snow-globe-makecode.md)
- [Pushrod Garage](https://learn.adafruit.com/pushrod-garage.md)
- [Techno-Tiki RGB LED Torch](https://learn.adafruit.com/techno-tiki-rgb-led-torch.md)
- [Cyberpunk Santa Eye](https://learn.adafruit.com/cyberpunk-santa-eye.md)
