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

Similar documents
Crawling Animatronic Hand

Ping Pong Ball Launcher

Crawling Baby Sea Turtle Robot

Paper Airplane Launcher

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

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

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

Mini Golf Course with Circuit Playground and Crickit

Slider Crank Mechanism -- from Cardboard and Craft Sticks

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

Crickit Powered Holiday Diorama

Crickit Carnival Bumper Bot

Adabot Operation Game

Android GBoard Morse Code Control with Circuit Playground Express

Hammer Time Mini Golf Hazard with Crickit

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

Infinity Mirror Valentine's Candy Box

Reindeer Mask with Animated Eyes

Crickit Powered Mini Chair Swing Ride!

The Scream: Interactive Screaming Painting

Bunny Ears with MakeCode

Circuit Playground Express Head-Tilt Ears

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

Milk Jug Glow Skull. Created by John Park. Last updated on :28:36 PM UTC

Wind Blowing Emoji Prop

Easy Sparkle Pocket T-Shirt

BLE Light Switch with Feather nrf52840 and Crickit

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

Adafruit Capacitive Touch Sensor Breakouts

Con Badge with Circuit Playground Express

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

3D Printed Google AIY Voice Kit

HalloWing Jump Scare Trap

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

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

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

Secret Hollow Book Intrusion Detector

Portable Apple Watch Charger

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

NeoPixie Dust Bag with Circuit Playground Express

NeoPixel Ring Bangle Bracelet

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

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

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

Guardian Shield+ Zelda Breath of the Wild

Tent Lantern. Created by Timothy Reese. Last updated on :17:25 AM UTC

Trellis 3D Printed Enclosure

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

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

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

Adafruit AMG8833 8x8 Thermal Camera Sensor

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

DIY Circuit Playground Shields

NeoMatrix 8x8 Word Clock

CircuitPython Snow Globe

Prophet 600 GliGli mod

Coffee Detonator: The TNT Plunger Grinder

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

UFO Flying Saucer with Circuit Playground Express

Light-Up Angler Fish Embroidery

Trinket-Powered Conference Room Occupancy Display

Bike Wheel POV Display

Raspberry Pi Selfie Bot

Trinket NeoPixel LED Longboard

Data Logging with Feather and CircuitPython

GPS Logging Dog Harness

Adafruit DRV2605 Haptic Controller Breakout

Adafruit GPIO Expander Bonnet for Raspberry Pi Created by Kattni Rembor. Last updated on :12:47 PM UTC

3D Printed 20w Amplifier Box

Adafruit MCP9808 Precision I2C Temperature Sensor Guide

Circuit Playground Yoyo

7 Portable Multitouch Raspberry Pi Tablet

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

Phone-Activated Talking Dog Collar

Overwatch Prop Gun: Lucio's Blaster Pt. 3

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

Mad Science Test Tube Rack

Adafruit VL53L0X Time of Flight Micro-LIDAR Distance Sensor Breakout

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

Audio Prank Gift Box. Created by Becky Stern. Last updated on :46:15 PM UTC

Adafruit TPL5110 Power Timer Breakout

Spinning Disc Step Sequencer

Adafruit ATWINC1500 WiFi Breakout

Magical Mistletoe. Created by Leslie Birch. Last updated on :45:29 PM UTC

Glowing Smokey Skull. Created by Ruiz Brothers. Last updated on :03:40 PM UTC

Naughty or Nice Machine

Circuit Playground Combadge

Modifying Servos for Continuous Rotation

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

Adafruit IO Basics: Servo

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

Adafruit PowerBoost 500 Shield

CircuitPython Media Dial

LED Breath Stats Mask

Adafruit CCS811 Air Quality Sensor

3D Printed Case for Adafruit Feather

Circuit Playground Digital Input

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

Transcription:

Crickit Dancing Marionette Kit Created by Dano Wall Last updated on 2019-04-04 07:03:11 PM UTC

Overview This project demonstrates how to build a robotic marionette that is controlled with four arcade-style buttons. The cardboard rig can be configured to control and animate any marionette, and draws inspiration from this Pinocchio marionette (https://adafru.it/e7b). The Electronics This project is based around the CRICKIT robotics platform. Four buttons and four small servo motors are connected through CRICKIT to create a rig capable of animating any marionette you choose to use. Adafruit CRICKIT for Circuit Playground Express $29.95 IN STOCK ADD TO CART Your browser does not support the video tag. Circuit Playground Express Adafruit Industries https://learn.adafruit.com/universal-marionette-with-crickit Page 3 of 36

$24.95 IN STOCK ADD TO CART 1 x USB cable - USB A to Micro-B 3 foot long ADD TO CART 4 x Sub-micro Servo SG51R ADD TO CART 1 x Arcade Button Quick-Connect Wire Pairs 0.11" (10 pack) ADD TO CART 1 x Arcade Button - Red 30mm Translucent ADD TO CART 1 x Arcade Button - Yellow 30mm Translucent ADD TO CART 1 x Arcade Button - Green 30mm Translucent ADD TO CART 1 x Arcade Button - Blue 30mm Translucent ADD TO CART 1 x Premium Male-Male Jumper Wires 20x12" (300mm) ADD TO CART 1 x 5V Power Supply 110/240V input, 5V output to 2A OUT OF STOCK Other Materials In addition to the electronics, for this project you will need: A large cardboard box Scrap corrugated cardboard Paper clips Adafruit Industries https://learn.adafruit.com/universal-marionette-with-crickit Page 4 of 36

Scissors and/or box cutter Hot glue gun (https://adafru.it/djk) Hot glue sticks (https://adafru.it/dig) String (or thin fishing line) Adafruit Industries https://learn.adafruit.com/universal-marionette-with-crickit Page 5 of 36

CircuitPython Code Getting to know CircuitPython CircuitPython (https://adafru.it/cgs) is a programming language based on Python, one of the fastest growing programming languages in the world. It is specifically designed to simplify experimenting and learning to code on lowcost microcontroller boards. CircuitPython is easiest to use within the Mu Editor. If you haven't previously used Mu, this guide will get you started (https://adafru.it/ano). If you've never used Circuit Playground Express with CRICKIT before, make sure you've updated it with the latest special 'seesaw' version of the CPX firmware. This guide will show you how (https://adafru.it/bfh). Uploading Make sure you've connected the Circuit Playground Express to your computer (mac/pc/linux) via a known good USB A to micro-b cable. Your board should show up as a flash disk drive named CIRCUITPY (If you see a disk name CPLAYBOOT, try pressing the reset button again. If the only drive name you get is named CPLAYBOOT, CircuitPython may not be loaded on the board. You can load CircuitPython as per this guide (https://adafru.it/afi)). Once your board is connected, copy code.py from the window below and paste it into Mu. Press the Save button and your code should automatically be saved to the CIRCUITPY disk drive (which appears when the Circuit Playground Express is plugged into your computer) as code.py. Adafruit Industries https://learn.adafruit.com/universal-marionette-with-crickit Page 6 of 36

# CircuitPython for the Adafruit Learning System Tutorial # Universal Marionette Kit # Project by Dano Wall, code by Mike Barela for Adafruit Industries # MIT License import time from adafruit_crickit import crickit # For signal control, we'll chat directly with seesaw, use 'ss' to shorted typing! ss = crickit.seesaw # four buttons with pullups, connect to ground to activate BUTTON_1 = crickit.signal1 # button #1 connected to signal port 1 & ground BUTTON_2 = crickit.signal2 # button #2 connected to signal port 2 & ground BUTTON_3 = crickit.signal3 # button #3 connected to signal port 3 & ground BUTTON_4 = crickit.signal4 # button #4 connected to signal port 4 & ground ss.pin_mode(button_1, ss.input_pullup) # Set as input with a pullup resistor ss.pin_mode(button_2, ss.input_pullup) ss.pin_mode(button_3, ss.input_pullup) ss.pin_mode(button_4, ss.input_pullup) while True: if not ss.digital_read(button_1): print("button 1 pressed") crickit.servo_1.angle = 40 time.sleep(0.1) else: crickit.servo_1.angle = 140 if not ss.digital_read(button_2): print("button 2 pressed") crickit.servo_2.angle = 140 time.sleep(0.1) else: crickit.servo_2.angle = 40 if not ss.digital_read(button_3): print("button 3 pressed") crickit.servo_3.angle = 40 time.sleep(0.1) else: crickit.servo_3.angle = 140 if not ss.digital_read(button_4): print("button 4 pressed") crickit.servo_4.angle = 140 time.sleep(0.1) else: crickit.servo_4.angle = 40 Make sure the file saved to CIRCUITPY is named "code.py", this will allow it to run automatically when your CPX is powered on. Adafruit Industries https://learn.adafruit.com/universal-marionette-with-crickit Page 7 of 36

Troubleshooting Problem: My Circuit Playground Express isn't recognized by Mu! Solution: Make sure your board is set up with CircuitPython, which has the Circuit Playground Express show up as a flash drive named CIRCUITPY when you connect the CPX to your computer. If it is showing up as CPLAYBOOT on your computer, you can follow the steps in this guide (https://adafru.it/afi) to ensure CircuitPython is loaded and you see the CIRCUITPY drive. Problem: My buttons don't work! Solution: Make sure you've updated the CircuitPython firmware for CRICKIT (https://adafru.it/bfh)from the CRICKIT guide. Problem: Nothing is moving! Solution: Check that your Circuit Playground Express is connected to a 5V power supply and the small slide switch on CRICKIT is set to "ON". Be sure the lightest servo wire faces away from the CRICKIT board, the darkest (black.brown) is closest to the center of CRICKIT. Adafruit Industries https://learn.adafruit.com/universal-marionette-with-crickit Page 8 of 36

Dry Run Before going any further, it's best practice to get your buttons and motors connected and make sure they work as expected. Adafruit Industries https://learn.adafruit.com/universal-marionette-with-crickit Page 9 of 36

Quick-Connect Connect the quick-connect wire pairs (https://adafru.it/dmr) to the button terminals, and plug the male/male jumper wires into the JST connector at the other end. Adafruit Industries https://learn.adafruit.com/universal-marionette-with-crickit Page 10 of 36

Connect Buttons Use male/male jumper wires (https://adafru.it/e79) to connect buttons to the Signal ports 1, 2, 3, and 4. Extend the Servo Arm In the package with the servo are several plastic horns that can screw onto the servo. Select the one with two arms in a straight line. Extend the reach of the servo arm by taping a bamboo skewer to it. Plug each servo motor into the four servo ports on Crickit. Adafruit Industries https://learn.adafruit.com/universal-marionette-with-crickit Page 11 of 36

Optional 90 bend For the arms that will connect to the legs, it may help to add a 90 degree bend, thereby extending the reach outward and forward at the same time. Use hot glue to brace bends in wood skewers, then use tape and hot glue to affix the wooden armature to the servo motor hub. Connect 5V Power Now you should be able to plug in your Crickit and check that pressing each button results in movement from its corresponding servo motor. Adafruit Industries https://learn.adafruit.com/universal-marionette-with-crickit Page 12 of 36

Adafruit Industries https://learn.adafruit.com/universal-marionette-with-crickit Page 13 of 36

The Build Cardboard Marionette This construction technique uses scrap pieces of cardboard, folded into open segments and linked together with paper clips. You will need: Scrap cardboard Scissors Hot glue gun Paper clips WARNING! BURN HAZARD! Hot glue is very sticky and it's easy to accidentally burn your fingertips. Be careful when using it. Cardboard Limbs Cut a rectangle of cardboard approximately 2"x3" and fold into thirds. The leg segments you may want to size slightly larger. Glue small squares of cardboard to the ends of the folded rectangle. Make 8 of these segments (2 for each arm and 2 for each leg). Adafruit Industries https://learn.adafruit.com/universal-marionette-with-crickit Page 14 of 36

Link Segments Use something sharp to poke a hole in the end of each segment. Insert a paperclip into this hole in the cardboard. Adafruit Industries https://learn.adafruit.com/universal-marionette-with-crickit Page 15 of 36

Adafruit Industries https://learn.adafruit.com/universal-marionette-with-crickit Page 16 of 36

Push paper clips most of the way in and use dabs of hot glue to hold paper clips in place. Allow a few minutes to cool before moving the linked segments around. Adafruit Industries https://learn.adafruit.com/universal-marionette-with-crickit Page 17 of 36

Torso Cut a larger rectangle of cardboard and fold two flaps along slightly angled lines. Glue cardboard strips along the top and bottom to hold the folded flaps in place. Connect the arm linkages to the torso using the same paperclip technique as before. Adafruit Industries https://learn.adafruit.com/universal-marionette-with-crickit Page 18 of 36

Legs As with the arms, build two leg linkages, connecting each with paper clips and gluing the paper clips in place with hot glue. Adafruit Industries https://learn.adafruit.com/universal-marionette-with-crickit Page 19 of 36

Hands and Feet Connect the legs to the torso using paper clips. Glue some cardboard hands and feet onto the model. Adafruit Industries https://learn.adafruit.com/universal-marionette-with-crickit Page 20 of 36

The Head Make a head out of a folded strip of cardboard. Insert a paper clip into the bottom of the head and top of the torso to link them together. A small hole poked in the top of the head will allow for a string to be threaded through which will be used to support the marionette. Adafruit Industries https://learn.adafruit.com/universal-marionette-with-crickit Page 21 of 36

Adafruit Industries https://learn.adafruit.com/universal-marionette-with-crickit Page 22 of 36

Adafruit Industries https://learn.adafruit.com/universal-marionette-with-crickit Page 23 of 36

Add Strings Use thin wire or string to connect limbs to servo extensions Your marionette should now be ready to dance! Adafruit Industries https://learn.adafruit.com/universal-marionette-with-crickit Page 24 of 36

Adafruit Industries https://learn.adafruit.com/universal-marionette-with-crickit Page 25 of 36

Connect the Electronics Servo Platform Make a small platform by introducing two 90 bends into each end of a strip of cardboard. Glue this to the top of your box. This will allow you to stack two pairs of servos above the marionette. Stacked Servos Use dabs of hot glue to mount the servos on top of box. IMPORTANT: Position the motors so that the arms are able to move freely without contacting each other. Adafruit Industries https://learn.adafruit.com/universal-marionette-with-crickit Page 26 of 36

Adafruit Industries https://learn.adafruit.com/universal-marionette-with-crickit Page 27 of 36

Attach CRICKIT Use some double sided tape (or hot glue if you prefer) to attach CRICKIT to the top edge of the box. Buttons Use a pencil to sketch the size and location of the buttons. Cut holes for buttons using a hobby knife - it's better to make the holes on the small side at first and only widen them if you need to. Adafruit Industries https://learn.adafruit.com/universal-marionette-with-crickit Page 28 of 36

Once the buttons are in place, reconnect the quick-connect cables to each button. Adafruit Industries https://learn.adafruit.com/universal-marionette-with-crickit Page 29 of 36

Adafruit Industries https://learn.adafruit.com/universal-marionette-with-crickit Page 30 of 36

Dance! Your marionette is now ready to learn some dance moves! Adafruit Industries https://learn.adafruit.com/universal-marionette-with-crickit Page 31 of 36

Coding with MakeCode If you'e like to use MakeCode for this project rather than CircuitPython, follow the instructions on this page. Note that the circuit used here is slightly modified to work with MakeCode. The current iteration of this code is stable in MakeCode/beta. Make sure you're URL says makecode.adafruit.com/beta#editor Getting Familiar Microsoft MakeCode for Adafruit is a web-based code editor that provides a block editor, similar to Scratch or Code.org, and also a JavaScript editor for more advanced users. If you'd like to learn more about MakeCode, this guide is a good place to start (https://adafru.it/bdk). How to Upload Code To upload code, connect you Circuit Playground Express to your computer using a micro USB cable and press the small reset button in the center of the board. All the LEDs will flash red briefly, then turn green. Your computer should now show removable drive called CPLAYBOOT. Click the Download button to download the.uf2 file to your computer, and drag 'n drop that.uf2 file onto the CPLAYBOOT drive in your computer's file explorer or finder. The drive will automatically eject itself (your computer may give you a "failed to eject drive correctly" error, you can ignore this). The code is now on your Circuit Playground Express and ready to run! Adafruit Industries https://learn.adafruit.com/universal-marionette-with-crickit Page 32 of 36

MakeCode Click the button below to enter the portal to interact with the code for this project The Logic The code for this project employs a tricky bit of logic to get the buttons to respond as they do. The not_ function returns true if the input is false, and false when the input is true. In this way, the servo motors are instructed to maintain the specified angle until a signal from the button is detected. A single forever loop is used to link each of the 4 input buttons to the 4 servo motors that will animate the limbs of the marionette. Depending on your setup, you may want to tweak the angles that each servo moves by changing the values in the crickit set servo # angle to 40. Keep in mind that the servos are placed in a mirror arrangement, so increasing the angle range for one will require decreasing that range for its mirror opposite. Some trial & error to sort this out is normal. Adafruit Industries https://learn.adafruit.com/universal-marionette-with-crickit Page 33 of 36

Once the code is uploaded to CPX you're ready to start putting the circuit together. Signals & Servos We will be utilizing 4 out of the 8 possible Signal I/O ports on CRICKIT to connect the buttons, and using up all 4 servo ports to plug in each servo. For a deeper dive into using input and output signals with CRICKIT, reference this guide (https://adafru.it/e78). Adafruit Industries https://learn.adafruit.com/universal-marionette-with-crickit Page 34 of 36

Circuit Diagram To use MakeCode for this project, we need to add some 1K pull up resistors to our circuit. These will allow the state of the buttons to be detected by the program. If you'd prefer not to use a breadboard, resistors can be stuck directly into the signals port on the Crickit. The resistors should connect the Signals line with the 3.3V line. Adafruit Industries https://learn.adafruit.com/universal-marionette-with-crickit Page 35 of 36

Adafruit Industries Last Updated: 2019-04-04 07:03:10 PM UTC Page 36 of 36