# (Super Quick) Magic 8 Ball Costume!

602

2

90s kids unite! And build this super fun, easy, and interactive costume!

Ask a (yes/no) question, shake the Micro:Bit, and it displays a fortune (obviously accurate) to your deepest most pressing questions, like what is life, how do we solve climate change, and why are pineapples so difficult to cut open. Except you'll do a better job with phrasing your questions as yes/no :)

Anyway....

Here we go!

Build Time: < 30 min.

Project Cost: \$15 - \$20

### Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

## Step 1: Materials

• Micro:Bit
• 2xAAA Battery Case
• 2 AAA Batteries (plus some extras if you plan to wear the costume for more than 3 hours)

... Seriously, that's it!

Oh, and to make it all aesthetically pleasing and on point:

• Cardboard (like a 4" x 4" square)
• Blue Paint

## Step 2: Program the Micro:Bit !

Step 1: Go to www.MakeCode.org and open a new Micro:Bit project.

Step 2: Write a program to display randomly generated messages of your choosing!

Go to Variables and create a unique variable for each message you want to send (e.g. msg1, msg2, ...msg42, etc).

Go to Inputs and drag out the On shake block. In On shake, add "set item to" from Variables, then go to the Math blocks and connect the "pick random 0 to..". Change the random number range (i.e. the 2nd number) to reflect the total number of messages you are showing (e.g. if you have 5 messages, the random number range is 0 to 4 because there are 5 possible numbers: 0, 1, 2, 3, 4).

Almost done! Add an "If - Then" from Loops. In the first if, set the condition to: item = 0, then display the first message ("show string" block w/ the variable name for your first message (e.g. msg1)). Recommended to repeat the message at least once 'cause scrolling letters can be hard to read! Repeat the if statement condition for each random number and message, and viola, c'est fini! You can test the code in the simulation on the left side of the screen by clicking the Play button and then Shake (:

When you're ready, download the code, plug in your Micro:Bit, and then drag the (.hex) file onto the Micro:Bit drive. The code is loaded when the power lights are done flashing!

## Step 3: Optional: Triangle Cover

Step 1: Make a cardboard triangle & paint it blue!

For most accurate imitation, go for an equilateral triangle (geometry for the win, woot woot!).

Step 2: Cut a 1 in. x 1 in. (2.5 cm x 2.5 cm) hole in the center for Micro:Bit LEDs.

Step 3: Attach Micro:Bit on back of triangle w/ glue or tape.

If using hot glue, avoid the battery and USB connector.

## Step 4: Wear It & Share It Pretty Bby!

Attach the Micro:Bit (& cardboard combo) to yourself or your clothes!

You can use velcro, tape, or hot glue (although probably avoid using this one on your actual skin..) Or make straps w/ string, twine, fabric, etc!

Put on your favorite black outfit & you're done! Quick & awesome & comfy Halloween costume for the winnnn :D

Feel free to ask any questions in the comments section. If you build this or a variation, please share your creations, I'd love to see what you make!!

Participated in the
Halloween Contest 2018