Hammer Time Mini Golf Hazard with Crickit

Similar documents
Crickit Carnival Bumper Bot

Crickit Powered Holiday Diorama

Mini Golf Course with Circuit Playground and Crickit

Crawling Baby Sea Turtle Robot

Slider Crank Mechanism -- from Cardboard and Craft Sticks

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

Ping Pong Ball Launcher

Paper Airplane Launcher

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

Crawling Animatronic Hand

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

Infinity Mirror Valentine's Candy Box

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

Crickit Powered Mini Chair Swing Ride!

Adabot Operation Game

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

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

The Scream: Interactive Screaming Painting

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

Circuit Playground Express Laser Tag

Circuit Playground Express Head-Tilt Ears

Con Badge with Circuit Playground Express

Wind Blowing Emoji Prop

Reindeer Mask with Animated Eyes

Bunny Ears with MakeCode

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

Sword & Wand Prop Effects with Circuit Playground

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

Android GBoard Morse Code Control with Circuit Playground Express

UFO Flying Saucer with Circuit Playground Express

3D Printed 20w Amplifier Box

3D Printed Google AIY Voice Kit

Portable Apple Watch Charger

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

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

Adafruit TPL5110 Power Timer Breakout

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

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

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

Circuit Playground Yoyo

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

Guardian Shield+ Zelda Breath of the Wild

Trellis 3D Printed Enclosure

Easy Sparkle Pocket T-Shirt

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

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

NeoPixie Dust Bag with Circuit Playground Express

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

BLE Light Switch with Feather nrf52840 and Crickit

Making Adabot: Part 1

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

3D Printed 20w Amplifier Box

Prophet 600 GliGli mod

Fiddy - the FTDI Clip

Mad Science Test Tube Rack

Simple LED Unicorn Horn

Adafruit Capacitive Touch Sensor Breakouts

Cup o' Sound. Created by Becky Stern. Last updated on :30:06 PM EST

NeoPixel Ring Bangle Bracelet

Celebration Spectacles

Secret Hollow Book Intrusion Detector

NeoMatrix 8x8 Word Clock

7 Portable Multitouch Raspberry Pi Tablet

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

Circuit Playground Combadge

Fiddy - the FTDI Clip

Punk LED Collar. Created by Becky Stern. Last updated on :02:45 PM EST

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

Trinket NeoPixel LED Longboard

Adafruit TPL5111 Reset Enable Timer Breakout

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

DIY Circuit Playground Shields

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

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

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

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

CircuitPython Snow Globe

Data Logging with Feather and CircuitPython

Light-Up Angler Fish Embroidery

Modifying Servos for Continuous Rotation

DIY Wireless DDR Dance Pad with Bluefruit EZ-Key

Adafruit MCP9808 Precision I2C Temperature Sensor Guide

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

FPV Mini Display. Created by Ruiz Brothers. Last updated on :00:18 PM UTC

Coffee Detonator: The TNT Plunger Grinder

Toy Car Speed Timer. Created by Kirby Griese. Last updated on :13:49 PM UTC

3D Printed LED Buckle

Adafruit VL53L0X Time of Flight Micro-LIDAR Distance Sensor Breakout

Mystical LED Halloween Hood

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

Bike Wheel POV Display

HalloWing Jump Scare Trap

MiniPOV4 - DIY Full-Color Persistence of Vision & Light-Painting Kit

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

Adafruit PowerBoost 500 Shield

3D Printed Camera LED Ring

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

GPS Logging Dog Harness

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

7" Portable HDMI Monitor

Transcription:

Hammer Time Mini Golf Hazard with Crickit Created by John Park Last updated on 2018-07-09 06:47:53 AM UTC

Guide Contents Guide Contents Overview Please Hammer, Don't Hurt Em Parts Materials & Tools Program the Crickit and CPX with MakeCode Crickit Install for MakeCode Crickit Setup Hammer Time Upload Code to the CPX Fancy Version Build the Hammer Hazard Hammer Head Handle Hammer Stand Striker Assembly Striker Wheel Motor Mount Add the Spring Make the Putting Green Add Cup Attaching the Hammer Time Hazard Back Rail Play Through! 2 3 3 3 3 5 5 5 6 7 7 9 9 12 14 16 16 18 23 25 25 28 30 32 Adafruit Industries https://learn.adafruit.com/mini-golf-hammer-time-circuit-playground-crickit Page 2 of 32

Overview Please Hammer, Don't Hurt Em You can build a hole for your dream miniature golf course that has this smashing obstacle -- the Hammer Time hazard! Using cardboard boxes, Crickit, Circuit Playground Express, a gearbox motor, and some craft supplies, you'll create a relentless hammer obstacle that takes just the right timing to avoid that hazard and sink your ball in the hole! Parts 1 x Adafruit CRICKIT for Circuit Playground Express Crickit: Creative Robotics and Interactive Construction Kit is an add-on to Circuit Playground Express that lets you #MakeRobotFriend using CircuitPython and MakeCode OUT OF STOCK 1 x Circuit Playground Express Round, Awesome Microcontroller Board 1 x TT Motor DC Gearbox 200 RPM 3 to 6VDC 1 x Alkaline AA batteries 3 pack 1 x 3 x AA Battery Holder with On/Off Switch OUT OF STOCK ADD TO CART ADD TO CART ADD TO CART 1 x Male DC Power adapter 2.1mm plug to screw terminal block ADD TO CART 1 x USB Cable micro USB cable ADD TO CART 1 x Mini Metal Speaker w/ Wires 8 ohm 0.5W ADD TO CART Materials & Tools For this project you'll need: Large corrugated cardboard box Small corrugated cardboard box Popsicle stick Adafruit Industries https://learn.adafruit.com/mini-golf-hammer-time-circuit-playground-crickit Page 3 of 32

Toothpick or bamboo skewer Paddle wheel attachment for TT motor or other wheel 2ea. Zip ties Wire twist tie Magic Spring, a.k.a. "Slinky" Golf ball and putter (or you can improvise -- make your own cardboard putter!) Paper cup Hobby knife Pencil Hot glue gun and glue, or white glue and patience Packing tape Adafruit Industries https://learn.adafruit.com/mini-golf-hammer-time-circuit-playground-crickit Page 4 of 32

Program the Crickit and CPX with MakeCode Crickit Install for MakeCode You can code your Crickit and Circuit Playground Express using MakeCode! Head on over to the Crickit with MakeCode guide to get set up! (https://adafru.it/bkc) Crickit Setup Plug the motor leads into the Crickit's Motor 1 port. Connect the red wire to the outer terminal and the black one to the inner terminal. Also, plug in the battery pack to the Crickit's DC power jack. You can optionally connect the speaker to the Crickit's Speaker terminal if you'll be using the advanced version of the code later that includes a bonus song. Adafruit Industries https://learn.adafruit.com/mini-golf-hammer-time-circuit-playground-crickit Page 5 of 32

Hammer Time The program for basic operation is incredibly simple -- it only uses four blocks! From the Input category, get two on button A click blocks, and use the drop down menu to switch one to on button B click. From the Crickit category, drag the crickit run motor 1 at 50% block into the on button A click block. This will cause the motor to run at half speed. Change the value to 100%. You can tune this later to make the hazard harder or easier. We want a neat way to stop the motor, too. From the Crickit category, drag a crickit stop motor 1 block into the on button B click block. That's all it takes to get things moving! Adafruit Industries https://learn.adafruit.com/mini-golf-hammer-time-circuit-playground-crickit Page 6 of 32

Upload Code to the CPX Change the program's name from 'untitled' to 'Hammer Time' and then download it to your local hard drive. With the Circuit Playground Express (CPX) plugged in via USB, press the CPX's reset button once so the NeoPixels turn green. This places it into bootloader mode. Drag the 'circuitplayground-hammer Time.uf2' file you downloaded onto the CPLAYBOOT drive. The CPX will reboot and is ready for golfing! Fancy Version Here's a more elaborate version that adds many more features and interactivity elements, including a bonus easter egg song playback when you press button A! Have a look at this one to see how it works. These are the key concepts: NeoPixel ring is initialized as a strip so we can use advanced features, such as rotating the color values The two buttons each have a "state" so that pressing button B toggles a variable to start and stop the motor, and pressing button A toggles a variable to start and stop a song A function is used to encapsulate the song composition Moving the switch changes a motor_speed variable between 50% and 100%, which is used elsewhere in the code instead of an explicit number to determine the motor speed Adafruit Industries https://learn.adafruit.com/mini-golf-hammer-time-circuit-playground-crickit Page 7 of 32

Here's a link to the finished program (https://adafru.it/blr) so you can edit it if you like, or simply download it and use it as is! Optionally, plug in the small metal speaker to the Speaker output terminals on the Crickit for a bigger sound! Adafruit Industries https://learn.adafruit.com/mini-golf-hammer-time-circuit-playground-crickit Page 8 of 32

Build the Hammer Hazard To create the hammer action, we'll need to build a lightweight, yet sturdy hammer -- a perfect time to use corrugated cardboard! The hammer will have a pivot running through its handle so that the motor-driven striker can whack the back of the handle, raising up the hammer. Gravity will cause it to drop back down. Since the TT motor doesn't have a huge amount of torque, we need to help it along so that it doesn't stall out. That's what the slinky rainbow spring is for! We'll use it to assist with raising the hammer, plus it's highly adjustable, and looks awesome!! Hammer Head Cut a rectangle of corrugated cardboard roughly 8" x 4" with the flutes of the corrugation running parallel to the short (4") side -- working with the grain this way will make it easier to roll the cardboard into a cylinder Roll the cardboard into a cylinder Place a strip of packing tape on one of the ends as shown, then tape the ends together Trace then ends and cut out two circles from paper or chipboard (cereal boxes are a good source) Glue the ends onto the hammer head Adafruit Industries https://learn.adafruit.com/mini-golf-hammer-time-circuit-playground-crickit Page 9 of 32

Adafruit Industries https://learn.adafruit.com/mini-golf-hammer-time-circuit-playground-crickit Page 10 of 32

Adafruit Industries https://learn.adafruit.com/mini-golf-hammer-time-circuit-playground-crickit Page 11 of 32

Handle Cut a strip of cardboard about 11" x 3/4", making sure the grain runs parallel to the long edge If you can, use 5-ply, double thickness cardboard, or cut two strips and laminate them together with glue for added strength Cut a small notch in the hammer head to insert the handle Place some glue on the head end of the handle, then insert it all the way in, pressing it in place Adafruit Industries https://learn.adafruit.com/mini-golf-hammer-time-circuit-playground-crickit Page 12 of 32

while the glue dries If needed, add a dab of glue at the insertion point as well Adafruit Industries https://learn.adafruit.com/mini-golf-hammer-time-circuit-playground-crickit Page 13 of 32

Hammer Stand Bend a strip of cardboard as shown into a bracket to support the hammer's handle pivot, again using either 5-ply or double up two strips for extra thickness Glue the strip down to a piece of chipboard Poke a hole through the handle and the stand for the pivot Use a length of bamboo skewer or a toothpick for the pivot Adafruit Industries https://learn.adafruit.com/mini-golf-hammer-time-circuit-playground-crickit Page 14 of 32

Adafruit Industries https://learn.adafruit.com/mini-golf-hammer-time-circuit-playground-crickit Page 15 of 32

Striker Assembly The striker assembly is made with a gearbox motor and a paddlewheel with a popsicle stick attached to it. This will strike the hammer handle once per revolution when it is spinning. First, we'll build the striker wheel, and then attache the motor to a small box to act as a stand. Striker Wheel Secure the popsicle stick to the paddle wheel with two zip ties as shown, with one end protruding from the wheel and the other end flush with the Adafruit Industries https://learn.adafruit.com/mini-golf-hammer-time-circuit-playground-crickit Page 16 of 32

wheel Be sure the stick clears above the axle mounting hole on the paddle wheel Pull the zip ties tight Trim the excess zip tie ends Adafruit Industries https://learn.adafruit.com/mini-golf-hammer-time-circuit-playground-crickit Page 17 of 32

Motor Mount Place the strike wheel on one shaft of the TT motor, no need to screw it in just yet Find and mark a the position of the opposite shaft when the assembly is positioned so that the end of the popsicle stick will reach approximately the middle of the box horizontally, and clear the bottom without hitting the ground vertically Poke a hole through this point large enough to fit the shaft With the motor shaft in the hole you just made, use a paper clip or safety pin to mark two points on the box where the motor's screw mounts will be positioned as shown Poke the holes out a bit larger so they will fit the twist tie Mount the motor inside the box with the shaft protruding as shown, using the twist tie to secure it Place the paddle wheel on the motor shaft, then Adafruit Industries https://learn.adafruit.com/mini-golf-hammer-time-circuit-playground-crickit Page 18 of 32

secure it in place with a small screw Adafruit Industries https://learn.adafruit.com/mini-golf-hammer-time-circuit-playground-crickit Page 19 of 32

Adafruit Industries https://learn.adafruit.com/mini-golf-hammer-time-circuit-playground-crickit Page 20 of 32

Adafruit Industries https://learn.adafruit.com/mini-golf-hammer-time-circuit-playground-crickit Page 21 of 32

Make sure the motor wires are outside the box, then close its flaps. Depending on the style of box, you may be able to leave two flaps open to help secure the striker assembly to the putting green later. Move the hammer stand in place and you can see how the full striker assembly will work. However, the hammer is a bit heavy for the motor, so we'll add a spring assist! Adafruit Industries https://learn.adafruit.com/mini-golf-hammer-time-circuit-playground-crickit Page 22 of 32

Add the Spring Use a piece of packing tape to secure the first coil to the top of the hammer as shown Adafruit Industries https://learn.adafruit.com/mini-golf-hammer-time-circuit-playground-crickit Page 23 of 32

Press the tape down firmly, then test pulling up on the hammer with the spring Adafruit Industries https://learn.adafruit.com/mini-golf-hammer-time-circuit-playground-crickit Page 24 of 32

Adafruit Industries https://learn.adafruit.com/mini-golf-hammer-time-circuit-playground-crickit Page 25 of 32

Make the Putting Green A large shipping box is perfect for building a putting green. I used a box from a flat-pack piece of Swedish furniture, so the dimensions required no modification, just the addition of the obstacles and cup. The two halves of the box are laid end to end for a longer green. You may need to cut, fold, and join parts to construct a similar green, depending on your materials. Add Cup Position the cup about 12" from one end of your cardboard box Trace the bottom of the cup as a general guide, then redraw a slightly larger circle and cut it out with a hobby knife Place the cup in the hole and mark a line on the cup all the way around as a cutting guide Use scissors to cut the cup from the lip to the marked circle into six strips -- these will act as mounting flanges Tape the cup underneath the box, right under the hole Adafruit Industries https://learn.adafruit.com/mini-golf-hammer-time-circuit-playground-crickit Page 26 of 32

Adafruit Industries https://learn.adafruit.com/mini-golf-hammer-time-circuit-playground-crickit Page 27 of 32

Adafruit Industries https://learn.adafruit.com/mini-golf-hammer-time-circuit-playground-crickit Page 28 of 32

Attaching the Hammer Time Hazard Place the hammer stand behind the hole as shown, so the hammer head strikes just a bit in front of the cup. Place the striker assembly so that it will hit the hammer properly -- you can turn it on to test the best position. Then, tape both the hammer stand and striker assembly down with packing tape. Pull the spring up and over the striker assembly box so that it has just the right amount of tension to help the hammer up, but not so much that it never comes back down! Adafruit Industries https://learn.adafruit.com/mini-golf-hammer-time-circuit-playground-crickit Page 29 of 32

Adafruit Industries https://learn.adafruit.com/mini-golf-hammer-time-circuit-playground-crickit Page 30 of 32

Back Rail You can now take a strip of cardboard and make a protective back rail. This will keep the ball from falling off of the green, and from destroying the mechanism! Just make sure you cut the strip of cardboard narrow enough so that it clears under the hammer's handle right at the pivot point. Adafruit Industries https://learn.adafruit.com/mini-golf-hammer-time-circuit-playground-crickit Page 31 of 32

You can use tape or glue to hold secure the rail. If you like, add more cardboard strips for additional side rails. Adafruit Industries Last Updated: 2018-07-09 06:47:52 AM UTC Page 32 of 32

Play Through! Time to play! Press the ball into the cardboard a bit to create a divot to hold the ball in place while preparing mentally, physically, and emotionally for your putt. Clear your mind. Become the ball. Visualize success. STOP. Hammer Time.