Mini Golf Course with Circuit Playground and Crickit

Similar documents
Crawling Baby Sea Turtle Robot

Paper Airplane Launcher

Ping Pong Ball Launcher

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

Crawling Animatronic Hand

Hammer Time Mini Golf Hazard with Crickit

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

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

Crickit Carnival Bumper Bot

Crickit Powered Holiday Diorama

Slider Crank Mechanism -- from Cardboard and Craft Sticks

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

Infinity Mirror Valentine's Candy Box

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

Adabot Operation Game

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

Crickit Powered Mini Chair Swing Ride!

Reindeer Mask with Animated Eyes

Bunny Ears with MakeCode

Wind Blowing Emoji Prop

The Scream: Interactive Screaming Painting

Circuit Playground Express Head-Tilt Ears

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

Trellis 3D Printed Enclosure

Con Badge with Circuit Playground Express

Easy Sparkle Pocket T-Shirt

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

BLE Light Switch with Feather nrf52840 and Crickit

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

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

3D Printed Google AIY Voice Kit

Prophet 600 GliGli mod

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

Sword & Wand Prop Effects with Circuit Playground

NeoMatrix 8x8 Word Clock

NeoPixie Dust Bag with Circuit Playground Express

Guardian Shield+ Zelda Breath of the Wild

Simple LED Unicorn Horn

Circuit Playground Express Laser Tag

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

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

UFO Flying Saucer with Circuit Playground Express

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

DIY Circuit Playground Shields

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

Circuit Playground Yoyo

Android GBoard Morse Code Control with Circuit Playground Express

Portable Apple Watch Charger

LED Eyes. Created by Ruiz Brothers. Last updated on :50:55 AM 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 :42:16 PM UTC

7 Portable Multitouch Raspberry Pi Tablet

Data Logging with Feather and CircuitPython

Big Cat Costumes. Dress like a lion, lynx, or cheetah this Halloween and Trick-or-Treat for Big Cats!

Fiddy - the FTDI Clip

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

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

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

TRON Bag. Created by Becky Stern

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

Adafruit Capacitive Touch Sensor Breakouts

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

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

3D Printed 20w Amplifier Box

Glowing Star Chuck Taylor Sneakers

Webcam Cover-Up Lego brick with Adabot Mini Fig

Making Adabot: Part 1

Adafruit Prototyping Pi Plate. Created by Ladyada

Fiddy - the FTDI Clip

Secret Hollow Book Intrusion Detector

EXTENSION ARM INSTRUCTIONS

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

PrecisionCut Hair Clipper

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

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

Adafruit Pi Cobbler Kit

Luminous LED Flowers. Created by Becky Stern. Last updated on :47:44 PM UTC

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

Mystical LED Halloween Hood

Create your own handmade drum lampshade!

Phone-Activated Talking Dog Collar

Adafruit PowerBoost 500 Shield

Trinket NeoPixel LED Longboard

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

CircuitPython Snow Globe

GPS Logging Dog Harness

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

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

Bike Wheel POV Display

Adafruit Mini TFT " 160x80

3D Printed Camera LED Ring

Solder Dispenser Adabot Head

Adafruit 8x16 LED Matrix FeatherWing

HalloWing Jump Scare Trap

DIY Wireless DDR Dance Pad with Bluefruit EZ-Key

Unicorn Hat with Moving Ears

3D Printed 20w Amplifier Box

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

Adafruit TPL5110 Power Timer Breakout

Adafruit 1.27" and 1.5" Color OLED Breakout Board

Transcription:

Mini Golf Course with Circuit Playground and Crickit Created by Dano Wall Last updated on 2018-08-22 04:09:31 PM UTC

Guide Contents Guide Contents Overview Materials & Tools Adafruit Parts CRICKIT Assembly Create the Course Unboxing the box Two-tier obstacle course Add the Obstacles Windmill Making the frame Mounting the motor Swinging Gate Ball Return Extra Credit: 360 Loop Connect to CRICKIT MakeCode for Golfers Before you start programming... Getting into Bootloader Mode The Code How to upload code What this code does It's Alive! Decorating Archway Furry windmill Scary gate RAWR! Play Mini Golf! Exploring further 2 3 3 3 4 5 5 6 11 11 11 14 17 19 22 26 29 29 29 29 30 30 31 33 33 34 36 38 40 41 Adafruit Industries https://learn.adafruit.com/mini-golf-course-with-makecode-circuit-playground-crickit Page 2 of 41

Overview It doesn't take a long road trip to experience the joys of miniature golf. Just a few cardboard boxes, craft supplies, a couple of servos, and a Circuit Playground Express with CRICKIT (https://adafru.it/biy)programmed with MakeCode (https://adafru.it/wmd) can bring a whole obstacle course to life. Materials & Tools To build this project, you will need: Medium-sized cardboard box (to make the course) Scrap pieces of cardboard (to make the obstacles) Scissors and/or X-acto knife Double-sided tape (https://adafru.it/bjh) Popsicle sticks Golf ball (or ping pong ball) and golf putter Adafruit Parts 1 x Adafruit CRICKIT for Circuit Playground Express 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 Circuit Playground Express is the perfect introduction to electronics and programming ADD TO CART 1 x Micro servo This little servo can rotate approximately 180 degrees (90 in each direction). Works just like standard servos you're used to, but smaller. ADD TO CART 1 x DC Gearbox Motor - "TT Motor" - 200RPM - 3 to 6VDC TT DC Gearbox Motor with a gear ratio of 1:48 and 2 x 200mm wires with breadboard-friendly 0.1" male connectors ADD TO CART Adafruit Industries https://learn.adafruit.com/mini-golf-course-with-makecode-circuit-playground-crickit Page 3 of 41

1 x USB cable - A/MicroB - 3ft Standard A to micro-b USB cable ADD TO CART 1 x 3xAA holder with DC jack Battery holder 3xAA batteries with 2.1mm DC jack ADD TO CART 1 x Alkaline AA batteries - 3 pack These batteries are good quality at a good price, and work fantastic with any of the kits or projects that use AAs. ADD TO CART CRICKIT Assembly If your Circuit Playground Express and CRICKIT aren't already connected, now is the time to do that. The animation below demonstrates how the two become one. Adafruit Industries https://learn.adafruit.com/mini-golf-course-with-makecode-circuit-playground-crickit Page 4 of 41

Create the Course Unboxing the box Just about any medium sized cardboard box can work for this project. To prepare your box, first cut through any tape on the top and bottom so that the flaps are free. Find the seam and gently pull it apart. Unfold the box so it lies flat. Adafruit Industries https://learn.adafruit.com/mini-golf-course-with-makecode-circuit-playground-crickit Page 5 of 41

Two-tier obstacle course Cut off two flaps from one of the middle sections of the box. These flaps will be made into supports for our course. Take these two flaps and cut about a 2 inch rectangle off the end. Use scissors to make a 1 inch cut in the center of both pieces of cardboard. Slot these two pieces together at 90 degrees to each other. Press firmly together. Now we have two free-standing supports! These will allow us to add a second level to our mini golf course. Adafruit Industries https://learn.adafruit.com/mini-golf-course-with-makecode-circuit-playground-crickit Page 6 of 41

Adafruit Industries https://learn.adafruit.com/mini-golf-course-with-makecode-circuit-playground-crickit Page 7 of 41

Adafruit Industries https://learn.adafruit.com/mini-golf-course-with-makecode-circuit-playground-crickit Page 8 of 41

Slide these two supports under the end of the unfolded box. Adafruit Industries https://learn.adafruit.com/mini-golf-course-with-makecode-circuit-playground-crickit Page 9 of 41

This forms the foundation of our mini golf course. Obstacles can now be added onto the course! Adafruit Industries https://learn.adafruit.com/mini-golf-course-with-makecode-circuit-playground-crickit Page 10 of 41

Add the Obstacles Mini golf is all about navigating through obstacles to get your ball in the hole. Below are four obstacle challenges which can be built out of cardboard, paper, tape and glue. We will use CRICKIT with Circuit Playground Express to control these obstacles, and learn a bit of MakeCode along the way. These obstacles can be used more or less interchangeably. Position them to make your course as easy or difficult as you like! Windmill You can cut out a 2-blade or 4-blade windmill, depending on the level of difficulty you want. Making the frame First, we'll need to make a frame on which to mount our spinning windmill. Take a piece of cardboard about 12 inches tall and 20 inches wide. Cut out a rectangle from the bottom, leaving 2-3 inches from the outside edge. Poke a hole in the center of your frame. Using the excess piece, cut out two new sections of Adafruit Industries https://learn.adafruit.com/mini-golf-course-with-makecode-circuit-playground-crickit Page 11 of 41

cardboard about 2"x4". These will be used as stabilizing feet for the frame. Use scissors to cut 1" slits in the center of the feet and the bottom of the arch. Align the slits in the two pieces of cardboard and press together. Your windmill frame can now stand on its own. Adafruit Industries https://learn.adafruit.com/mini-golf-course-with-makecode-circuit-playground-crickit Page 12 of 41

Adafruit Industries https://learn.adafruit.com/mini-golf-course-with-makecode-circuit-playground-crickit Page 13 of 41

Mounting the motor Stick DC motor hub through center hole you added earlier. Use something pointy to mark the motor's mounting hole positions. Use a twist-tie or piece of solid-core wire to cinch the motor to the cardboard. Screw windmill blade to motor hub. Adafruit Industries https://learn.adafruit.com/mini-golf-course-with-makecode-circuit-playground-crickit Page 14 of 41

Adafruit Industries https://learn.adafruit.com/mini-golf-course-with-makecode-circuit-playground-crickit Page 15 of 41

Once connected to CRICKIT, your windmill will be spinning in no time! Adafruit Industries https://learn.adafruit.com/mini-golf-course-with-makecode-circuit-playground-crickit Page 16 of 41

Swinging Gate Cut a rectangular strip of cardboard, about 2" x 8". Cut a strip of double sided tape, about the length of one popsicle stick. Tape cardboard gate to one side of the popsicle stick, and tape the servo horn to the other side. Trim the corners off the gate. This will help prevent it from colliding with anything as it swings up and down. This gate is now ready to mount on your servo motor! Adafruit Industries https://learn.adafruit.com/mini-golf-course-with-makecode-circuit-playground-crickit Page 17 of 41

Adafruit Industries https://learn.adafruit.com/mini-golf-course-with-makecode-circuit-playground-crickit Page 18 of 41

This servo-powered gate will be programmed to go up and down in a pattern that you control. Ball Return This obstacle is all about accuracy. Not only must you get past all the obstacles, but also aim your putt so the ball goes in the Adafruit Industries https://learn.adafruit.com/mini-golf-course-with-makecode-circuit-playground-crickit Page 19 of 41

hole. The slinky can also be positioned to conveniently return the ball to you. Cut out an arc of cardboard on which to mount the slinky. This will support the slinky as the ball passes through it. Tape the ends and middle of the slinky to this cardboard. A small square of cardboard can be added at the end to further direct the ball as it exits the slinky. The ball return will be mounted at the very end of the course. Use the slinky to mark the location and diameter of the hole. Adafruit Industries https://learn.adafruit.com/mini-golf-course-with-makecode-circuit-playground-crickit Page 20 of 41

Save yourself from chasing down your ball after making a hole in one. This slinky return chute will send it rolling back to you. Adafruit Industries https://learn.adafruit.com/mini-golf-course-with-makecode-circuit-playground-crickit Page 21 of 41

Extra Credit: 360 Loop This loop requires the use of hot glue and is trickier to build than the previous obstacles. Determined makers read on... WARNING! BURN HAZARD! Hot glue is very sticky and it's easy to accidentally burn your fingertips. Be careful when using it. To build a loop, find two circular objects, one about 1" larger in diameter than the other (such as a dinner plate and a medium sized plate). Trace the outlines on two pieces of cardboard. Cut out these outlines so that you're left with two donut shaped rings. Cut a line through the two rings. Mount them on a cardboard base, stretching the rings to either side as pictured. Use a long strip of paper or cardboard to create the track. Carefully glue this track in place, sequentially adding small dabs of glue as you go. Trim any excess length off the end of the track and glue it Adafruit Industries https://learn.adafruit.com/mini-golf-course-with-makecode-circuit-playground-crickit Page 22 of 41

firmly in place. Adafruit Industries https://learn.adafruit.com/mini-golf-course-with-makecode-circuit-playground-crickit Page 23 of 41

It's fun to test your loop a few times before installing it on your course. Adafruit Industries https://learn.adafruit.com/mini-golf-course-with-makecode-circuit-playground-crickit Page 24 of 41

Adafruit Industries https://learn.adafruit.com/mini-golf-course-with-makecode-circuit-playground-crickit Page 25 of 41

Connect to CRICKIT Once you've installed your obstacles on your course, connect them to CRICKIT as pictured. Connect the DC motor powering your windmill to CRICKIT's motor block in position 1. Plug servo motor into CRICKIT (making sure the brown/black wire is facing inwards). Connect the Battery pack to the CRICKIT and make sure the switch is turned ON If you need to extend your wires to position the obstacles where you want them, servo extensions can be found here (https://adafru.it/bji) and jumper wire extensions can be found here (https://adafru.it/bjj). Adafruit Industries https://learn.adafruit.com/mini-golf-course-with-makecode-circuit-playground-crickit Page 26 of 41

Use double sided tape to stick servo-controlled gate and CRICKIT in place on the course. Adafruit Industries https://learn.adafruit.com/mini-golf-course-with-makecode-circuit-playground-crickit Page 27 of 41

If you find your motors struggling, check that your batteries are fresh! If you're interested in adding even more obstacles, or having a permanent installation - a 2 amp power supply (https://adafru.it/bzi) or 4 Amp power supply (https://adafru.it/e50) can be used and should be able to handle the power needs for as many other motors you want to add! Adafruit Industries https://learn.adafruit.com/mini-golf-course-with-makecode-circuit-playground-crickit Page 28 of 41

MakeCode for Golfers Now it's time to upload the code! Microsoft MakeCode for Adafruit is a web-based code editor for physical computing. It provides a block editor, similar to Scratch or Code.org, and also a JavaScript editor for more advanced users. If you haven't used MakeCode before, this guide is a good place to start (https://adafru.it/bdk). Before you start programming......make sure you have the CRICKIT extension installed in MakeCode. Detailed instructions on how to do that can be found in this guide (https://adafru.it/bwa). Once you've got that taken care of you are ready to move forward! 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 for the first time. BUT... We'd like to make it work with MakeCode, 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. The Code Follow this link (https://adafru.it/blp) or enter the portal below to interact with the code used in this project. Be sure you use the green Servo blocks under the CRICKIT group and NOT the red Servo blocks under the PINS block group! Adafruit Industries https://learn.adafruit.com/mini-golf-course-with-makecode-circuit-playground-crickit Page 29 of 41

How to upload code To upload code, connect you Circuit Playground Express to your computer using the micro USB cable, click the Download button to download the.uf2 file to your computer, 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.) The code is now on your Circuit Playground Express and ready to run! What this code does The sample sketch in MakeCode provides us with some simple commands for our obstacles. Firstly, in the on start block we can see that the windmill is set to start spinning as soon as CRICKIT is powered on (the volume is also set to be quite loud). If you need to stop the windmill, press the B button on the Circuit Playground Express. If you want to restart the windmill, press the A button and it will play a warning siren and start rotating again. Secondly, in the forever block, we can see that the gate is set to swing up and down in a timed pattern. This gives you a short window in which to make your shot before the gate comes slicing back down. If you'd like to play with the code, click "Edit" and a new window will open in which you can create your own version. Adafruit Industries https://learn.adafruit.com/mini-golf-course-with-makecode-circuit-playground-crickit Page 30 of 41

If you'd like to make the course more or less challenging, you can change the speed of the windmill in the crickit run motor 1 at 40% block. Increase it to 70%, or decrease it to 30% (note that, depending on your power supply, the DC motor may have trouble spinning below a certain threshold). The timing of the gate can also be altered by changing the number in the pause blocks. Making these shorter or longer durations will make it easier or harder to time your putt! It's Alive! Plug in your battery pack and turn on power to CRICKIT and you should see your obstacles come to life! Adafruit Industries https://learn.adafruit.com/mini-golf-course-with-makecode-circuit-playground-crickit Page 31 of 41

Adafruit Industries https://learn.adafruit.com/mini-golf-course-with-makecode-circuit-playground-crickit Page 32 of 41

Decorating Now for the best part - decorating your mini golf course! There are many ways you and upgrade and beautify your mini golf creation, below are three examples of fun additions. Archway This decorative archway makes an attractive entrance to your course. Take 4-5 pipe cleaners. Bend the pipe cleaners into a "U" shape, adding a 90 degree bend at the ends. Tape these in a line to the entrance to the course. Pass the ball through the archway! Adafruit Industries https://learn.adafruit.com/mini-golf-course-with-makecode-circuit-playground-crickit Page 33 of 41

Furry windmill To spruce up the windmill, as well as make it more challenging, a trail of furry yarn can be added to the tips of each blade. First, use a screwdriver to remove your windmill blade from the motor hub. Cut 20-30 pieces of yarn about 4-5 inches long. Tie a knot in each end. Poke a series of holes in the end of your windmill blade (a skewer works well for this). Adafruit Industries https://learn.adafruit.com/mini-golf-course-with-makecode-circuit-playground-crickit Page 34 of 41

Using the tip of the skewer, push the yarn through to the other side. Repeat this process until your windmill blade is sufficiently furry. The trailing bits of yarn aren't just pretty, they will throw your ball off course if you aren't careful! Adafruit Industries https://learn.adafruit.com/mini-golf-course-with-makecode-circuit-playground-crickit Page 35 of 41

Scary gate If a gate coming slicing down isn't already intimidating, adding some personality to it certainly helps. Use scissors to cut out a row of teeth along the bottom edge. Use a marker to add a face of some sort (preferably one that looks like it means business). A glue stick works well to stick googly eyes to cardboard. Add some glue to the back and press them down firmly for ~5 seconds to get a good bond. Adafruit Industries https://learn.adafruit.com/mini-golf-course-with-makecode-circuit-playground-crickit Page 36 of 41

Adafruit Industries https://learn.adafruit.com/mini-golf-course-with-makecode-circuit-playground-crickit Page 37 of 41

RAWR! You can have fun exploring many different designs for the gate obstacle. Let your imagination run wild! Adafruit Industries https://learn.adafruit.com/mini-golf-course-with-makecode-circuit-playground-crickit Page 38 of 41

Adafruit Industries https://learn.adafruit.com/mini-golf-course-with-makecode-circuit-playground-crickit Page 39 of 41

Play Mini Golf! Once you have everything connected and the course decorated to your liking, it's time to play some Mini Golf! Start by plugging your power supply into CRICKIT and turning it on. It may take a few tries to make it past the obstacles. It's important to time your shot carefully. Many things can go wrong. Adafruit Industries https://learn.adafruit.com/mini-golf-course-with-makecode-circuit-playground-crickit Page 40 of 41

But finally you'll make a hole in one! Exploring further If you enjoy MakeCode and want to continue exploring you can check out lots more MakeCode projects on the Adafruit Learn System (https://adafru.it/bwv). Adafruit Industries Last Updated: 2018-08-22 04:09:25 PM UTC Page 41 of 41