Light up your favorite Easter eggs and display them for all to see! We'll make a simple paper-crafted stand from a dixie cup, hook up the NeoPixel lights, and choose colors with drag-and-drop code using Microsoft MakeCode.

This is an easy, crafty project that's great to do with kids. Hook up the lights and let each egg's artist may choose the perfect color, or make the lights display a pretty animated rainbow.

We've also included a 3D printed stand tutorial for those artists ready for the next level of awesomeness.

This project is simple and fun, and kids will adore seeing their creations come to life with colored light.

Parts

Circuit Playground Express is the next step towards a perfect introduction to electronics and programming. We've taken the original Circuit Playground Classic and...
Out of Stock
Attaching NeoPixel strips to your costume can be a struggle as the flexible PCBs can crack when bent too much. So how to add little dots of color? Use these stranded NeoPixel dots!...
$27.50
In Stock
You have a Circuit Playground Express, and want to connect some wires to it for adding LEDs or sensors or speakers? You can use our...
$1.50
In Stock
This cable is super-fashionable with a woven pink and purple Blinka-like pattern!First let's talk about the cover and over-molding. We got these in custom colors,...
Out of Stock

You'll Also Need

  • Fresh Eggs (not hard-boiled)
  • Dixie Cups
  • Scissors
  • A needle or pin
  • An awl or other poking device
  • A small hammer

Electronics Tools

Our first step is to get some code running on the Circuit Playground so that when we hook up the lights, we know if it's working.

The easiest way to control these lights is with Microsoft MakeCode, a drag-and-drop online code editor. It's free and fun to use and will get you up and running in no time.

You can click the code below and download it as-is, or you can follow along and code it yourself, choosing your favorite colors and adding your own customizations.

To learn more about MakeCode from square one, we've got a great primer guide you can check out.

Here's the finished code for the easter egg project. Click the "edit" button in the upper right hand corner to open it up in MakeCode.

Take a look at the code. The column on the left are tabs that contain code snippets, and the area on the right is our workspace where we build the code.

We've got two green blocks, called on start and forever. Anything inside on start happens once, when the Circuit Playground starts up, and anything in forever will run over and over, forever.

In the on start block, we set up the NeoPixel strip on pin A1 and tell it how many pixels we want to light up, and then also set the brightness of the strip. 

In the forever block, we tell each of our 4 pixels what color we want it to be. Notice that the first pixel is numbered 0. This is how computers count -- starting with 0 instead of 1 -- so pixel number 0 will be the first pixel in our strip. Whatever color you'd like for that first pixel, put it in the 0 block.

You can change the colors of each of the pixels here, or copy and paste the block to add more pixels. Just make sure each pixel has a unique number so you aren't trying to tell a pixel to be two colors at once.

The fourth pixel in the strip (pixel number 3, as computers count) is set up to animate like a rainbow. We've made a variable called hue, and every time the code runs, the hue number changes by one. The code is running over and over very fast, so by changing the hue variable we can change the color of the light. If you change the variable by more (maybe by 2, or 3, or even 20) then the light will change colors much more quickly.

You could also slow down the color change by going to the LOOPS tab and getting a pause 100ms block, and putting it inside your forever loop. Then, every time the code runs, it will put a little pause in there to slow things down.

Download your Code

Once you've got the colors you want for each pixel, click the Download link in the lower left corner. A file will be saved onto your computer. Plug your Circuit Playground into your computer with a good USB cable. (Some cables are charge-only, so if you're not seeing results, try a different cable)

The lights on the Circuit Playground will turn green. (If they don't, press the tiny "reset" button in the middle of the board.) A drive will appear on your computer called CPLAYBOOT.

Drag the file you just downloaded onto this drive. That's it! Your Circuit Playground is programmed. Time to hook up the lights.

Troubleshooting

If you're having trouble, head over to this MakeCode guide for lots more instructions and things to try.

Next Steps

There are so many things you can do with MakeCode. Check out our Make it Glow - NeoPixel Basics guide for a whole lot more ideas and code samples. 

Have fun choosing colors for each of your eggs!

Your NeoPixel strand has 3 wires. The red wire will connect to VOUT, the middle wire to A1, and the third wire to GND.

Be sure you're connecting to the correct end of the strip! Always connect to the IN end. If you connect to the other end of the strip, it won't light up. 

The IN end is usually the end with the male connector, but not always - sometimes a shipment of lights will be wired up differently, so it always pays to check. If you lay out the strip as shown in the wiring diagram, with the red wire closest to you and the pixels face-up, you should have it correct.

Find the IN End

NeoPixel dots have the word IN printed on the back of the pixel on one side. It's hard to see. If you can't tell, and you're just not sure, lay the pixel dots face up with the strip flowing away from you. If the red wire is on the left, you're holding the IN end. If it's on the right, you're holding OUT. Or look for the male connector, it's usually on the IN end.

Hooking Up with the Bolt-On Kit

Get out your bolt-on kit. It comes with four screws and four bolts that are just the right size to fit through the Circuit Playground's mounting holes. We'll need just three of them (so if you dropped one on the floor and lost it in the carpet, no worries).

Once you've found the IN end of your strip, cut off the connector. Pull the three wires apart a bit so you have a least a half inch of free wire to work with. Then use your wire strippers to strip about 1/4" of shielding off each of these three wires.

Twist the stripped wires together. The red wire goes to VOUT, the middle wire to A1, and the remaining wire goes to GND.

Now, stick the bolts through the holes and secure them with the little nuts on the back. It helps to use a screwdriver to tighten them down. You don't need them to be super tight -- finger-tight is fine. The idea is just to hold the wires firmly in place against the pads.

Power up your Circuit Playground with the USB cable and watch the lights glow!

Troubleshooting

If your lights aren't working, here are some things to check:

  1. Are you connected to the "in" end of the strip? 
  2. Are any of your wires loose or touching other pads? Being tidy with the wires will help a lot.
  3. Did you double check your wiring? Red goes to VOUT, the middle wire to A1, and the other wire to GND.
  4. Try uploading your code again, and be sure the code is looking for a light strand on pin A1.

Check out the video at the beginning of the guide for a full walk-through. Here are the steps you'll follow:

Prepare the Egg Shell

  1. Make a tiny pin-sized hole in the top of the egg. It's easier to do this if the egg is sitting inside your dixie cup.
  2. Turn the egg over and make a larger hole at the bottom of the egg. This hole should be a little bigger than the size of the NeoPixel dot.
  3. Blow the egg out through the pin hole.
  4. Decorate your egg however you like!

Don't worry if you break it -- sometimes the broken eggs are the most beautiful.  There is a crack in everything. That’s how the light gets in. 

Make the Base

  1. Cut a circular hole in the bottom of the Dixie cup
  2. Cut around the cup about 3/4 inch from the bottom, so your stand is short enough that the light will reach inside the egg
  3. Cut out slots in both sides for the wire to feed through
  4. Place the base over the light, and the egg on top of the base so the hole aligns with the LED, and watch your egg glow.

The video above details how I created the light stand using Tinkercad, a free online 3D design program. You can follow along and make your own stand, or download mine below:

I printed this one in gold PLA filament, with supports turned on. It turned out just lovely!

Parts

Having a 3D printer without filament is sort of like having a regular printer without paper or ink. And while a lot of printers come with some filament there's a good chance...
Out of Stock
The Monoprice Inventor II 3D Printer Touchscreen with WiFi is a perfect entry-level 3D printer with small footprint and reliable performance. It comes equipped with...
Out of Stock

This guide was first published on Apr 15, 2020. It was last updated on Apr 15, 2020.