Snake Charmer Box. Created by Dano Wall. Last updated on :07:25 PM UTC

Similar documents
Ping Pong Ball Launcher

Crawling Animatronic Hand

Crawling Baby Sea Turtle Robot

Paper Airplane Launcher

Slider Crank Mechanism -- from Cardboard and Craft Sticks

Pushrod Garage. Created by John Park. Last updated on :07:30 PM UTC

Crickit Dancing Marionette Kit Created by Dano Wall. Last updated on :03:11 PM UTC

Mini Golf Course with Circuit Playground and Crickit

Trash Panda. Created by Dano Wall. Last updated on :30:46 AM UTC

Infinity Mirror Valentine's Candy Box

Stumble-Bot. Created by Dano Wall. Last updated on :04:06 AM UTC

Crickit Carnival Bumper Bot

Hammer Time Mini Golf Hazard with Crickit

Adabot Operation Game

Crickit Powered Holiday Diorama

CPX Mystery Dreidel. Created by Kathy Ceceri. Last updated on :51:40 PM UTC

Neon LED Signs. Created by John Park. Last updated on :11:09 PM UTC

Steven Universe Cosplay Shirt & Gem Created by Erin St Blaine. Last updated on :54:25 PM UTC

Bunny Ears with MakeCode

Easy Sparkle Pocket T-Shirt

Reindeer Mask with Animated Eyes

Circuit Playground Express Head-Tilt Ears

Wind Blowing Emoji Prop

Crickit Powered Mini Chair Swing Ride!

Circuit Playground Express Laser Tag

Sword & Wand Prop Effects with Circuit Playground

Interactive Gift Box. Created by codingpro. Last updated on :47:40 AM UTC

Android GBoard Morse Code Control with Circuit Playground Express

DIY Circuit Playground Shields

3D Printed Google AIY Voice Kit

Con Badge with Circuit Playground Express

The Scream: Interactive Screaming Painting

FLORA and GEMMA ICSP. Created by Becky Stern. Last updated on :42:16 PM UTC

Interior Purse Light. Created by Becky Stern. Last updated on :41:08 PM UTC

HalloWing Jump Scare Trap

NeoPixie Dust Bag with Circuit Playground Express

Sewable NeoPixels. Created by Becky Stern. Last updated on :50:14 PM EDT

Prophet 600 GliGli mod

Adafruit MCP9808 Precision I2C Temperature Sensor Guide

Trellis 3D Printed Enclosure

FLORA TV-B-Gone. Created by Becky Stern. Last updated on :32:57 PM UTC

PyPortal NeoPixel Color Picker Created by Kattni Rembor. Last updated on :42:41 PM UTC

FLORA and GEMMA ICSP. Created by Becky Stern. Last updated on :30:55 PM EST

UFO Flying Saucer with Circuit Playground Express

Circuit Playground Combadge

BLE Light Switch with Feather nrf52840 and Crickit

Data Logging with Feather and CircuitPython

Adafruit DRV2605 Haptic Controller Breakout

NeoMatrix 8x8 Word Clock

Adafruit Capacitive Touch Sensor Breakouts

Adafruit Si7021 Temperature + Humidity Sensor

NeoPixel Fairy Crown. Created by Erin St Blaine. Last updated on :22:47 AM UTC

Boomy The Boombox. Created by Ruiz Brothers. Last updated on :52:13 PM UTC

Secret Hollow Book Intrusion Detector

LED Eyes. Created by Ruiz Brothers. Last updated on :50:55 AM UTC

Clockwork Goggles. Created by John Park. Last updated on :03:10 PM UTC

NeoPixel Ring Bangle Bracelet

Feather Weather Lamp. Created by Ruiz Brothers. Last updated on :54:26 PM UTC

Joy Featherwing. Created by Dean Miller. Last updated on :03:07 PM UTC

No-Sew LED Wristband. Created by Kathy Ceceri. Last updated on :23:40 PM UTC

Adafruit APDS9960 breakout

NeoPixel Manicure. Created by Sophy Wong. Last updated on :50:38 PM UTC

Guardian Shield+ Zelda Breath of the Wild

PyPortal View Master Created by Ruiz Brothers. Last updated on :51:28 AM UTC

i2c/spi LCD Backpack Created by lady ada Last updated on :11:04 PM UTC

Adafruit DRV2605 Haptic Controller Breakout

GPS Logging Dog Harness

Simple LED Unicorn Horn

Adafruit Pi Cobbler Kit

MCP Bit DAC Tutorial

Adafruit LED Sequins. Created by Becky Stern. Last updated on :02:00 AM UTC

'Sup Brows. Created by Kate Hartman. Last updated on :52:04 PM UTC

Adafruit AM2320 Sensor

FLORA Pixel Brooch. Created by Becky Stern. Last updated on :19:07 PM EST

Mystical LED Halloween Hood

Adafruit 8x16 LED Matrix FeatherWing

Jewel Hair Stick. Created by Leslie Birch. Last updated on :47:17 PM UTC

Zelda Thunder Helm. Created by Ruiz Brothers. Last updated on :46:52 PM UTC

Adafruit 8x16 LED Matrix FeatherWing

3D Printed 20w Amplifier Box

CircuitPython Media Dial

Adafruit 7-Segment LED FeatherWings

Adafruit IO Basics: Servo

Adafruit VL53L0X Time of Flight Micro-LIDAR Distance Sensor Breakout

Solar Boost Bag. Created by Becky Stern. Last updated on :44:55 PM UTC

Introducing Adafruit Trellis

ISS Pin. Created by Leslie Birch. Last updated on :27:30 PM UTC

3D Printed Camera LED Ring

Fiddy - the FTDI Clip

Adafruit CCS811 Air Quality Sensor

Lady Ada's Bento Box. Created by lady ada. Last updated on :55:35 AM UTC

Trinket-Powered Conference Room Occupancy Display

Circuit Playground Yoyo

Modifying Servos for Continuous Rotation

LED Lightbox. Created by Sam Clippinger. Last updated on :50:00 AM UTC

NeoPixel Bike Light. Created by Ruiz Brothers. Last updated on :43:46 PM UTC

CircuitPlayground Minecraft Gesture Controller

Portable Apple Watch Charger

Adafruit I2C FRAM Breakout

Adafruit TPL5110 Power Timer Breakout

Transcription:

Snake Charmer Box Created by Dano Wall Last updated on 2018-08-22 04:07:25 PM UTC

Guide Contents Guide Contents Overview Materials Circuit Playground Express Standard servo - TowerPro SG-5010 Small Alligator Clip to Male Jumper Wire Bundle - 6 Pieces USB cable - A/MicroB In addition, for this project you will need: Creating Blinka Add the fishing line Working with MakeCode Getting into Bootloader Mode Drop in your code Test it! Assemble the Box Just add Blinka Exploring Further Using Different Inputs Uploading New Code 2 3 3 3 4 4 4 4 6 9 12 12 12 13 16 20 24 24 24 Adafruit Industries https://learn.adafruit.com/snakecharmer Page 2 of 25

Overview This guide will show you how to build your own musical snake charmer box with Blinka, the circuit python! The materials you can find around the house and the project uses the Circuit Playground Express microcontroller programmed in Microsoft MakeCode for easy upload and changes. Materials Your browser does not support the video tag. Circuit Playground Express $24.95 IN STOCK ADD TO CART Adafruit Industries https://learn.adafruit.com/snakecharmer Page 3 of 25

Standard servo - TowerPro SG-5010 $12.00 IN STOCK ADD TO CART Small Alligator Clip to Male Jumper Wire Bundle - 6 Pieces $3.95 IN STOCK ADD TO CART USB cable - A/MicroB $2.95 IN STOCK ADD TO CART In addition, for this project you will need: Double sided tape (https://adafru.it/bcb) Scrap cardboard Scissors Fishing line or string - 12" long Color printer If this is your first time using Circuit Playground Express, this guide is a good launchpad to get you up and running: https://learn.adafruit.com/adafruit-circuit-playground-express (https://adafru.it/adafruit-cpx) Let's get started! Adafruit Industries https://learn.adafruit.com/snakecharmer Page 4 of 25

Adafruit Industries https://learn.adafruit.com/snakecharmer Page 5 of 25

Creating Blinka Download the PDF of Blinka by clicking the green button below. https://adafru.it/b8j https://adafru.it/b8j Blinka can be printed out on any color printer. For best results print double sided on a single sheet of paper. Use scissors to carefully cut along the dotted lines. A glue stick or double sided tape works well to glue the mouth together and attach the head to the body. Make sure to only add glue to the blue parts. Press and hold together for a few seconds to allow the glue to set. Adafruit Industries https://learn.adafruit.com/snakecharmer Page 6 of 25

Add glue to the blue circles on Blinka's head and body. Align carefully and then press and hold these two parts together firmly. Adafruit Industries https://learn.adafruit.com/snakecharmer Page 7 of 25

Give Blinka a few minutes after gluing to allow the glue to take hold. Adafruit Industries https://learn.adafruit.com/snakecharmer Page 8 of 25

Add the fishing line Use a pointy tool to poke two holes in Blinka's head. These will allow us to add a bit of fishing line (or string) to connect her to the inside of the box. Be careful not to poke your fingers while making these holes! Once we have two holes side-by-side, it's time to thread the two ends of fishing line or string through. Adafruit Industries https://learn.adafruit.com/snakecharmer Page 9 of 25

Blinka is ready to go! Adafruit Industries https://learn.adafruit.com/snakecharmer Page 10 of 25

Adafruit Industries https://learn.adafruit.com/snakecharmer Page 11 of 25

Working with MakeCode If you haven't used MakeCode before, this guide is a good place to start (https://adafru.it/bdk). Getting into Bootloader Mode Your Circuit Playground Express board comes ready to work with CircuitPython, and will show up as "CIRCUITPY" when connected to your computer. We'd like to make it work with MakeCode however, which is done by putting it into "bootloader mode". All that's required to do this is to connect the board to your computer with a micro USB cable and click the small reset button in the center of the board. When the Circuit Playground Express is in Bootloader mode, all the LEDs will turn red briefly, then green. Verify your status LED is also pulsing red. Your computer should show a new removable drive called "CPLAYBOOT" Drop in your code Once you're in bootloader mode, you're ready to use MakeCode! This will allow you to interact with the code used in this project. Uploading code is easy, all you do is download the.uf2 file and drag 'n drop it onto the "CPLAYBOOT" drive. The drive will automatically eject itself. (Your computer may give you a "failed to eject drive correctly" error, you can ignore this.) This is the set of instructions that your Circuit Playground Express will follow. It may look like a lot at first, but what we're doing are three things in sequence: 1. Rotate servo quickly 100 degrees clockwise Adafruit Industries https://learn.adafruit.com/snakecharmer Page 12 of 25

2. Play 'snake charmer' song 3. Rotate servo slowly 100 degrees counter clockwise Test it! It's always a good idea to do a dry run before putting everything together. You can do this by connecting your servo motor to your Circuit Playground Express. Adafruit Industries https://learn.adafruit.com/snakecharmer Page 13 of 25

The servo has three wires, this is how they should connect: Brown --> GND Orange --> Vout Yellow --> A2 When you press the "A" button you should see the servo rotating one way quickly, playing a short song, and then moving back slowly to its starting position. Adafruit Industries https://learn.adafruit.com/snakecharmer Page 14 of 25

Adafruit Industries https://learn.adafruit.com/snakecharmer Page 15 of 25

Assemble the Box Now it's time to bring everything together. To create the lifting arm you'll need a piece of cardboard about 4 inches long by 2 inches wide. Adafruit Industries https://learn.adafruit.com/snakecharmer Page 16 of 25

Trim one corner into a semi-circular curve. Cut the opposite corner off at about a 45 degree angle. These two cuts will allow the cardboard to rotate inside the box without colliding into the floor or walls. Add a piece of double sided tape to the rounded corner of the cardboard. Trim any excess tape that extends past the cardboard edge. Adafruit Industries https://learn.adafruit.com/snakecharmer Page 17 of 25

Stick your piece of cardboard to the servo as pictured. This will become our lifting mechanism. Now it's time to mount the servo motor inside the box. Adafruit Industries https://learn.adafruit.com/snakecharmer Page 18 of 25

Make sure to give the lifting arm enough clearance! Place the servo inside the box and use a pen to mark exactly where you will place it. Adafruit Industries https://learn.adafruit.com/snakecharmer Page 19 of 25

Now add a piece of tap to the bottom of the servo motor. This will hold it in place inside the box. Press it firmly into place. Motor mount complete! Just add Blinka Now it's time to give Blinka a home inside the box. Adafruit Industries https://learn.adafruit.com/snakecharmer Page 20 of 25

Lift her carefully into the box, making sure to keep her spiral shape intact. Poke two hole in the top of the box, about an inch away from the front edge. Feed the two ends of the string or fishing line through these holes and tie them off. Two simple knots are sufficient to hold Blinka in place. Adafruit Industries https://learn.adafruit.com/snakecharmer Page 21 of 25

Check Blinka's placement within the box, ensuring that her tongue doesn't get caught as the box lid closes. Adafruit Industries https://learn.adafruit.com/snakecharmer Page 22 of 25

Now you can hook up your Circuit Playground Express, connect to power, and test your snake charming abilities! Adafruit Industries https://learn.adafruit.com/snakecharmer Page 23 of 25

Exploring Further Using Different Inputs By default this MakeCode example is set up to use the A button as a trigger, but it is easy to use other inputs to trigger your box. Try it out! https://makecode.adafruit.com/49951-32099-41050-46072 (https://adafru.it/bcc) Perhaps you want Blinka to pop our of her box as soon as someone enters a room and turns on the light? Easy! Click the pink "Input" button and drag the "on light dark" into the code space. You can use the dropdown menu on this block to change it to respond to sudden bright light instead of sudden darkness. Now drag the whole block of code into your new "on light bright" trigger. Uploading New Code To replace your old code with this new version, download the updated.uf2 file. It is sometimes helpful to rename your code so you don't get confused which version is which. BUT WHERE'S MY CPLAYBOOT? Make sure your CPX is connected to your computer, then press the reset button in the center of the board again. The board should flash red and then go green. This means it's ready to accept new code. Drag and drop your fresh.uf2 file onto the CPLAYBOOT drive and like magic it will automatically update & eject itself. Done! Blinka will now respond to a sudden bright light instead of the button press. You use different inputs to get Blinka to react to a loud sound or a sudden shake, just by dragging the code into a different input block! Adafruit Industries https://learn.adafruit.com/snakecharmer Page 24 of 25

If you want to continue exploring you can check out lots more MakeCode projects on the Adafruit Learn System: https://learn.adafruit.com/category/makecode (https://adafru.it/bwv) Adafruit Industries Last Updated: 2018-08-22 04:07:20 PM UTC Page 25 of 25