Crawling Baby Sea Turtle Robot

Similar documents
Paper Airplane Launcher

Crawling Animatronic Hand

Mini Golf Course with Circuit Playground and Crickit

Ping Pong Ball Launcher

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

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

Crickit Carnival Bumper Bot

Hammer Time Mini Golf Hazard with Crickit

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

Crickit Powered Holiday Diorama

Slider Crank Mechanism -- from Cardboard and Craft Sticks

Infinity Mirror Valentine's Candy Box

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

Adabot Operation Game

Crickit Powered Mini Chair Swing Ride!

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

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

Easy Sparkle Pocket T-Shirt

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

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

Bunny Ears with MakeCode

Wind Blowing Emoji Prop

Reindeer Mask with Animated Eyes

Circuit Playground Express Laser Tag

The Scream: Interactive Screaming Painting

Con Badge with Circuit Playground Express

Sword & Wand Prop Effects with Circuit Playground

BLE Light Switch with Feather nrf52840 and Crickit

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

Trellis 3D Printed Enclosure

UFO Flying Saucer with Circuit Playground Express

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

Android GBoard Morse Code Control with Circuit Playground Express

Circuit Playground Express Head-Tilt Ears

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

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

NeoPixie Dust Bag with Circuit Playground Express

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

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

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

NeoPixel Ring Bangle Bracelet

Prophet 600 GliGli mod

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

Circuit Playground Yoyo

NeoMatrix 8x8 Word Clock

Secret Hollow Book Intrusion Detector

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

Bike Wheel POV Display

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

Guardian Shield+ Zelda Breath of the Wild

HalloWing Jump Scare Trap

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

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

DIY Circuit Playground Shields

Tent Lantern. Created by Timothy Reese. Last updated on :17:25 AM 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

Portable Apple Watch Charger

Light-Up Angler Fish Embroidery

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

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

Adafruit Prototyping Pi Plate. Created by Ladyada

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

Adafruit TPL5110 Power Timer Breakout

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

Adafruit Capacitive Touch Sensor Breakouts

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

Adafruit VL53L0X Time of Flight Micro-LIDAR Distance Sensor Breakout

Coffee Detonator: The TNT Plunger Grinder

Data Logging with Feather and CircuitPython

3D Printed 20w Amplifier Box

Unicorn Hat with Moving Ears

CircuitPython Snow Globe

Phone-Activated Talking Dog Collar

Adafruit MCP9808 Precision I2C Temperature Sensor Guide

Adafruit Pi Cobbler Kit

3D Printed Google AIY Voice Kit

Making Adabot: Part 1

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

Adafruit PowerBoost 500 Shield

3D Printed Camera LED Ring

Trinket NeoPixel LED Longboard

Adafruit DRV2605 Haptic Controller Breakout

Adafruit LED Sequins. Created by Becky Stern. Last updated on :00:06 PM EST

7 Portable Multitouch Raspberry Pi Tablet

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

Glowing Star Chuck Taylor Sneakers

Mystical LED Halloween Hood

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

Home Security Begins at the Front Door

Simple LED Unicorn Horn

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

Celebration Spectacles

Motion-Activated Solder Fume Extractor With Lamp

GPS Logging Dog Harness

LED Breath Stats Mask

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

Mad Science Test Tube Rack

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

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

Transcription:

Crawling Baby Sea Turtle Robot Created by Dano Wall Last updated on 2018-08-22 04:10:26 PM UTC

Guide Contents Guide Contents Overview Save the Wee Turtles Household Materials Adafruit Electronics Create Turtle Remove flippers Make the Flippers Add Electronics Add the battery Attach motors Attach CRICKIT Connect motors Power with MakeCode Getting into Bootloader Mode The Code How to upload code What this code does Light Sensor Making Changes Troubleshooting Exploring Further More MakeCode! 2 3 3 3 3 5 7 9 13 13 14 15 17 19 19 19 19 20 21 22 22 23 24 Adafruit Industries https://learn.adafruit.com/baby-turtle-makecode Page 2 of 24

Overview Save the Wee Turtles The plight of baby sea turtles (https://adafru.it/but) trying to find their way to the ocean is one that has played out for millennia, and become increasingly harrowing (https://adafru.it/but) as humans habitation has encroaches on some of their ancestral nesting grounds. This project demonstrates how to build a robotic turtle that will respond to light, triggering it to start flapping its flippers and moving, hopefully, toward the freedom of the ocean (https://adafru.it/bv9). The tools and materials for this project (aside from the motors and microcontroller) are things you can find around the home. Paired with the versatile robotics platform, CRICKIT for Circuit Playground Express (https://adafru.it/biy), simple household materials can spring to life and take on any form your imagination desires! This project demonstrates basic programming skills using Microsoft MakeCode (https://adafru.it/buu) and allows for easy experimentation and adaptation. Household Materials Cardboard Paper Scissors Screwdriver Double-sided tape Zip ties (or twist ties/wire) Adafruit Electronics Adafruit Industries https://learn.adafruit.com/baby-turtle-makecode Page 3 of 24

1 x Circuit Playground Express Circuit Playground Express is the perfect introduction to electronics and programming ADD TO CART 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 2 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 2 x Snap-on Hub for TT Motor This motor hub snaps onto the TT motor and is a good solution to quickly and easily add custom parts to your robot project 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 1 x 3xAA holder with DC jack Battery holder 3xAA batteries with 2.1mm DC jack ADD TO CART 1 x USB cable - A/MicroB - 3ft Standard A to micro-b USB cable ADD TO CART Adafruit Industries https://learn.adafruit.com/baby-turtle-makecode Page 4 of 24

Create Turtle To make your turtle, start by printing out a copy of the sea turtle PDF below (it's a pdf version of this public domain sea turtle drawing (https://adafru.it/bw2)) If you would prefer to personalize your turtle, many other templates are available online under the search term "sea turtle outline (https://adafru.it/buk)". Or, use the pdf as a template, and draw your own turtle friend! https://adafru.it/bul https://adafru.it/bul Find a piece of scrap cardboard roughly the same size as your turtle. Apply glue to both the back of the paper and the cardboard. Place paper on cardboard and smooth out any air bubbles with another piece of scrap cardboard. Wait 5-10 minutes for the glue to dry, then cut around the outline using scissors or knife. Adafruit Industries https://learn.adafruit.com/baby-turtle-makecode Page 5 of 24

Adafruit Industries https://learn.adafruit.com/baby-turtle-makecode Page 6 of 24

Remove flippers Remove the flippers from the body by carefully cutting them away using scissors or a knife. These will get attached to motors and power the turtle forward. Adafruit Industries https://learn.adafruit.com/baby-turtle-makecode Page 7 of 24

Adafruit Industries https://learn.adafruit.com/baby-turtle-makecode Page 8 of 24

Make the Flippers To attach the flippers to the motors, we will use a snap on motor hub (https://adafru.it/btr). Zip ties or twist ties work great as a method of attachment. Mark the position of the motor hub against your flipper. Poke two holes through flipper using something pointy. Use zip-ties or twist-ties to hold flipper to motor hub. Adafruit Industries https://learn.adafruit.com/baby-turtle-makecode Page 9 of 24

Adafruit Industries https://learn.adafruit.com/baby-turtle-makecode Page 10 of 24

Repeat the process for the second flipper. Depending on your design, you may need to trim the edges of the flipper so that's it's not quite as long. This step is important to allow the motors to spin all the way around and not get stuck. Adafruit Industries https://learn.adafruit.com/baby-turtle-makecode Page 11 of 24

Once these flippers are to your satisfaction, it's time to get them moving! Let's add some electronics... Adafruit Industries https://learn.adafruit.com/baby-turtle-makecode Page 12 of 24

Add Electronics Your sea turtle is ready to be outfitted with electronics! We will add the following: 1. Battery pack 2. Motors 3. CRICKIT microcontroller Add the battery Use screws provided to attach battery pack. Mark the position of the two center holes with a pen. Use screwdriver to poke holes in the cardboard. Don't widen the holes too much, the screw threads will grip the cardboard and pull themselves through. Tighten the battery pack into place. Adafruit Industries https://learn.adafruit.com/baby-turtle-makecode Page 13 of 24

Attach motors Mark the position of the motors with a pen or pencil. Use double-sided foam tape to stick motors to underside of turtle. Press hard to ensure strong bond. Adafruit Industries https://learn.adafruit.com/baby-turtle-makecode Page 14 of 24

Attach CRICKIT Use twist-ties to hold CRICKIT on turtle's back. Mark the position of two CRICKIT mounting holes. Poke these holes all the way through the cardboard. Thread your ties through these holes, tightening them to hold CRICKIT in place on your turtle's back. Adafruit Industries https://learn.adafruit.com/baby-turtle-makecode Page 15 of 24

Think carefully about the orientation of CRICKIT on your turtle's back, as you want to make sure motor and power connections are both accessible! Adafruit Industries https://learn.adafruit.com/baby-turtle-makecode Page 16 of 24

Connect motors Plug the ends of your motor cables into the terminal blocks on the "Motor" section of CRICKIT. Tighten these connections down with a screwdriver. Adafruit Industries https://learn.adafruit.com/baby-turtle-makecode Page 17 of 24

Make sure to load up your turtle with fresh batteries. These motors can get power hungry and your turtle may have trouble getting around if your batteries are low. Adafruit Industries https://learn.adafruit.com/baby-turtle-makecode Page 18 of 24

Power with MakeCode Now it's time to upload some code! For this we will be using Microsoft MakeCode for Adafruit, a web-based code editor. 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). Getting into Bootloader Mode Your Circuit Playground Express board comes ready to work with CircuitPython. When you connect the board to your computer for the first time, it will appear as a flash (or thumb) drive named CIRCUITPY. 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/buz) or enter the portal below to interact with the code used in this project. 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! Adafruit Industries https://learn.adafruit.com/baby-turtle-makecode Page 19 of 24

What this code does This sketch in MakeCode uses the light sensor on Circuit Playground Express to control the motors. In the on start block we can see that there is a startup animation and a command to invert the direction of one of the motors is so they will both spin in the same direction when placed in parallel. There is also a graph command, which indicates the light level by illuminating more or fewer of the 10 neopixels on the CPX board. In the forever block there is an if / else statement, which gives the following instructions: If light level goes above the specified value, start spinning the motors in tandem. If light level goes below the specified value (in this case, 150 ), stop the motors. If you'd like to play with this code, click "Edit" and a new window will open in which you can create your own version. You can test this out by holding your turtle under bright light and covering/uncovering the light sensor. Adafruit Industries https://learn.adafruit.com/baby-turtle-makecode Page 20 of 24

Light Sensor The component that makes this possible is the tiny analog light sensor in the top left part of the board. This is used to detect ambient light with similar spectral response to the human eye. With MakeCode we are able to use the readings coming from this light sensor to control the motors, but it's also possible, with some clever code, to use this as a color sensor or even a pulse sensor (https://adafru.it/bux)! Adafruit Industries https://learn.adafruit.com/baby-turtle-makecode Page 21 of 24

Making Changes If you want to make changes to your program you can connect your CPX to your computer with a micro USB cable, download your adapted code, and drag the new.uf2 file onto your CPLAYBOOT drive. It is recommended that you remove the turtle's flippers while making changes so the turtle doesn't run away on you. Troubleshooting Problem: My flippers aren't rotating! Solution: Make sure that the small slide switch on the CRICKIT is set to "ON". Problem: My Circuit Playground Express doesn't show up as CPLAYBOOT! Solution: Your Circuit Playground Express board comes ready to work with CircuitPython, and will show up as a flash drive named CIRCUITPY the first time it's connected to your computer. To switch over to work with MakeCode, connect the board to your computer with a micro USB cable and click the small reset button in the center of the board. When Circuit Playground Express is in Bootloader mode, all the LEDs will flash red briefly, then turn green. Your computer should now show removable drive called CPLAYBOOT. Now you can copy the MakeCode file to the CPLAYBOOT flash drive. Adafruit Industries https://learn.adafruit.com/baby-turtle-makecode Page 22 of 24

Exploring Further Depending on where you set your turtle, the ambient light available may be enough to trigger it to start flapping without a need for a flashlight. You can change how sensitive your turtle is to light by changing the value in the if light level > 150 block of code. Have fun playing with your turtle! See what obstacles it can climb over, or experiment with other ways to trigger the motors to turn, such as sound, a button click, or vibration! Adafruit Industries https://learn.adafruit.com/baby-turtle-makecode Page 23 of 24

If you'd like to customize your turtle, color it with markers or add craft paper, glitter/sequins, feel free to get creative with the design! More MakeCode! 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:10:20 PM UTC Page 24 of 24