# Robotic Creatures 

## Overview

https://youtu.be/QJ8ITURT0NU

In this project we'll show you how to bring creatures to life using magnetic filament and magnets, powered by a Circuit Playground Express and Crickit, Adafruit's robotics platform!&nbsp;

The enclosure houses the electronics and the models are printed in Magnetic PLA.

Adafruit’s Crickit and Circuit Playground Express have everything you need to build a project with lights, sounds, and motor control.

&nbsp;

![3d_printing_octo-swim-loop.gif](https://cdn-learn.adafruit.com/assets/assets/000/074/443/medium640thumb/3d_printing_octo-swim-loop.jpg?1555254826)

These magnetic creatures come to life when placed close to the platform. Here a motor and magnet move the creatures around the platform. NeoPixel UV LED help illuminate the dual translucent material!

The print in place hinges bring these 3d printed creatures to life!

![3d_printing_star-loop.gif](https://cdn-learn.adafruit.com/assets/assets/000/074/444/medium640thumb/3d_printing_star-loop.jpg?1555255010)

![](https://cdn-learn.adafruit.com/assets/assets/000/074/445/medium800thumb/3d_printing_octo-spin-loop.jpg?1555259846)

## Prerequisite Guides

There's resources in these guides that go beyond what's covered in this tutorial. MakeCode guide is all about setting up your Circuit Playground Express board. The Circuit Playground Express introduction guide walks you through all of the pinouts, sensors and everything you need to know.

- [MakeCode for Circuit Playground Express](https://learn.adafruit.com/makecode)
- [Introducing Circuit Playground Express](https://learn.adafruit.com/adafruit-circuit-playground-express)
- [Introducing CRICKIT](https://learn.adafruit.com/adafruit-crickit-creative-robotic-interactive-construction-kit)

## Parts

You can find the list of all parts used to make this project linked below!

### Adafruit CRICKIT for Circuit Playground Express

[Adafruit CRICKIT for Circuit Playground Express](https://www.adafruit.com/product/3093)
Sometimes we wonder if robotics engineers ever watch movies. If they did, they'd know that making robots into servants always ends up in a robot rebellion. Why even go down that path? Here at Adafruit, we believe in making robots our&nbsp; **friends!**

So if you find...

In Stock
[Buy Now](https://www.adafruit.com/product/3093)
[Related Guides to the Product](https://learn.adafruit.com/products/3093/guides)
![Top down view of a Adafruit CRICKIT for Circuit Playground Express with a circular board connected. ](https://cdn-shop.adafruit.com/640x480/3093-07.jpg)

### Circuit Playground Express

[Circuit Playground Express](https://www.adafruit.com/product/3333)
 **Circuit Playground Express** is the next step towards a perfect introduction to electronics and programming. We've taken the original Circuit Playground Classic and made it even better! Not only did we pack even more sensors in, we also made it even easier to...

In Stock
[Buy Now](https://www.adafruit.com/product/3333)
[Related Guides to the Product](https://learn.adafruit.com/products/3333/guides)
![A Black woman's manicured hand holds a round microcontroller with lit up LEDs.](https://cdn-shop.adafruit.com/640x480/3333-05.jpg)

### Adafruit NeoPixel UV LED Strip with 32 LED/m

[Adafruit NeoPixel UV LED Strip with 32 LED/m](https://www.adafruit.com/product/3851)
What new iteration of NeoPixel strip is this? Roll out the black light and disco ball! It's an **Adafruit NeoPixel** &nbsp; **Ultraviolet**** &nbsp;Strip with 32 LEDs per meter**! Each order comes as a single one meter long strip. If you order multiple...

In Stock
[Buy Now](https://www.adafruit.com/product/3851)
[Related Guides to the Product](https://learn.adafruit.com/products/3851/guides)
![Adafruit NeoPixel UV LED Strip flickering all LEDS](https://cdn-shop.adafruit.com/product-videos/640x480/3851-03.jpg)

### DC Motor in Micro Servo Body

[DC Motor in Micro Servo Body](https://www.adafruit.com/product/2941)
This tiny&nbsp; **DC Motor in Micro Servo Body** is an interesting motor - it's the same size and shape as our micro servo but it _isn't_ a servo. It's more like a DC motor + plastic gear-train in a box. It's not a super powerful motor, it would do well as a...

Out of Stock
[Buy Now](https://www.adafruit.com/product/2941)
[Related Guides to the Product](https://learn.adafruit.com/products/2941/guides)
![DC Motor in Micro Servo Body and 0.1" power cable](https://cdn-shop.adafruit.com/640x480/2941-00.jpg)

### High-strength 'rare earth' magnet

[High-strength 'rare earth' magnet](https://www.adafruit.com/product/9)
Yow! These things are super powerful. .47" diameter and .18" thick discs. Great for use with your SpokePOV Kit. If you have an aluminium frame, use tape/foam sticky tape to attach it.

In Stock
[Buy Now](https://www.adafruit.com/product/9)
[Related Guides to the Product](https://learn.adafruit.com/products/9/guides)
![Angled shot of a High-strength 'rare earth' magnet.](https://cdn-shop.adafruit.com/640x480/9-01.jpg)

### Part: Male to Male Jumper Wires
quantity: 1
Male to Male Jumper Wires
[Male to Male Jumper Wires](https://www.adafruit.com/product/1956)

### Part: CIRCUIT PLAYGROUND BOLT-ON KIT
quantity: 1
CIRCUIT PLAYGROUND BOLT-ON KIT
[CIRCUIT PLAYGROUND BOLT-ON KIT](https://www.adafruit.com/product/3816)

# Robotic Creatures 

## Circuit Diagram

## Circuit&nbsp;Diagram

This provides a visual reference for wiring of the components. They aren't true to scale, just meant to be used as reference. This diagrams was created using [Fritzing software](http://fritzing.org/download/).

Take a moment to review the components in the circuit diagram. This illustration is meant for&nbsp;referencing wired connections - The length of wire,&nbsp;position and size of components are not exact.

![](https://cdn-learn.adafruit.com/assets/assets/000/074/446/medium800/3d_printing_circuit-diagram.jpg?1555262209)

## **Connections:**

**DC in Servo Brody:&nbsp;**

Connect your two motor wires to the Motor 1 connectors. For now it does not matter which color wire goes in which Motor 1 slot. We used[Male to Male jumper wires](https://www.adafruit.com/product/759) to connect to the Motor terminal on the Crickit, these were then connected to the Female connector on the DC motor in Servo Body.&nbsp;

**UV NeoPixel Strip:**

The UV NeoPixel strip connects to the NeoPixel terminal on the Crickit. **Din** on the NeoPixel strip connects to the **arrow icon** on the terminal on the Crickit. **GND** connects to **GND** and **5V** to **5V**.

# Robotic Creatures 

## Code

## MakeCode for CRICKIT and Circuit Playground Express

MakeCode is this programming editor that runs in the Google Chrome web browser. It’s has an intuitive interface that’s both block based and a text editor.

It works with Adafruit's CRICKIT and Circuit Playground Express so you can make interactive projects with the on-board sensors and components. You can drag & drop blocks to make interactive programs using lights and sounds without having to solder or learning a new syntax.

You can alternatively upload code directly to the Circuit Playground Express with WebUSB,&nbsp;[see the steps to do so here](https://learn.adafruit.com/makecode/webusb).

## Code

The code for this project only takes ten blocks! You can download the code by clicking the green button below.

![](https://cdn-learn.adafruit.com/assets/assets/000/074/447/medium800/3d_printing_makecode.jpg?1555262595)

[Edit in MakeCode](https://makecode.com/_4MAgJY56mgTx)
## Setup Circuit Playground Express for MakeCode

To get started, we'll need to head over to the&nbsp;[Adafruit MakeCode](https://makecode.adafruit.com/beta?webusb=1#editor)&nbsp;website and follow the steps below.

1. Plug in your Circuit Playground Express with a known good data+power&nbsp; **USB Cable**
2. Press the&nbsp; **RESET** &nbsp;button. Green light means you're ready to MakeCode
3. Download the&nbsp; **UF2** &nbsp;file and drop it onto&nbsp; **CPLAYBOOT**.
4. If you see a flash drive named **CIRCUITPY** , press reset twice to get to the **CPLAYBOOT** drive.

## &nbsp;

## Install CRICKIT Extension for MakeCode

On the&nbsp;[MakeCode Adafruit](https://makecode.adafruit.com/)&nbsp;site, click on **New Project**. In the list of blocks, select **ADVANCED** and then **EXTENSIONS**. Click on the **Crickit** block that shows up and install Crickit support! You will now have a new **CRICKIT** bin of blocks you can use!

&nbsp;

Continue on to learn how to use these blocks.&nbsp;[Read the full guide here for more info](https://learn.adafruit.com/adafruit-crickit-creative-robotic-interactive-construction-kit/makecode).

&nbsp;

## Upload and Test Code

Once you have your CPX setup with the MakeCode UF2, try testing it out by uploading the code to the board. Click the green button above to open up the program in MakeCode. Click on the pink edit icon near the top of the title to open the code in the full editor. This will create a project in MakeCode and allow you to edit, modify and upload the code to the board.&nbsp;

## WebUSB

&nbsp;

Makecode can also pair with your Circuit Playground Express through a chrome web browser by&nbsp;[following this page in our MakeCode guide](https://learn.adafruit.com/makecode/webusb).

Open the project:&nbsp;[https://makecode.com/\_4MAgJY56mgTx](https://makecode.com/_4MAgJY56mgTx)

![3d_printing_makecode-b.jpg](https://cdn-learn.adafruit.com/assets/assets/000/074/448/medium640/3d_printing_makecode-b.jpg?1555262795)

With WebUSB, the code edit will upload directly to the Circuit Playground Express without the need to drag and drop file onto it!

Follow the instruction to set up your board and you'll be able to quickly send code to Circuit Playground Express!&nbsp;

# Robotic Creatures 

## 3D Printing

There are several pieces in this project which can be made with a 3D printer.

## What If I Don't Have A 3D Printer?

Not to worry! You can use a 3D printing service, such as&nbsp;a local 3D printer operator, to 3D print and ship you parts to you. This is a great way to get your&nbsp;parts 3D printed by local makers. You could also try checking out your local Library or search for a Maker Space.

![](https://cdn-learn.adafruit.com/assets/assets/000/074/449/medium800/3d_printing_3d-parts.jpg?1555262880)

## Edit Design

The design is&nbsp;modeled in&nbsp;Autodesk Fusion 360 and available&nbsp;to edit. You can adjust the pieces to print&nbsp;by moving or adding construction planes to cut up the parts&nbsp;. You can modify the&nbsp;sketches or adjust features in the&nbsp;parametric&nbsp;timeline.

[Edit CPX + Motor Mounts](https://a360.co/2PhOFe9)
[Edit Case](https://a360.co/2PcPLrh)
## Slice Settings

Depending on your 3D printer, you may need to&nbsp;adjust the slice settings. We printed all of the parts on an [Inventor II 3D Printer](https://www.adafruit.com/product/3897). These parts were sliced with FlashPrint.

- Nozzle: 0.4mm
- Extrusion Width: 0.4mm
- Layer Height: 0.2mm
- Infill: 20%
- Nozzle Temperature: 210c
- Print Speed: 60mm/s

## Design Source Files

The enclosure assembly was designed in Fusion 360.&nbsp;This can be downloaded in different formats like STEP, SAT and more. Electronic components like the board, displays, connectors and more can be downloaded from our&nbsp;[Fusion 360 CAD parts github repo](https://github.com/adafruit/Adafruit_CAD_Parts).

## Print Creatures

We used Magnetic Iron Filament to print our creatures.&nbsp;Objects with print in place hinges that move side to side vertically, maneuver the best around the platform. You can find download links to the models we used in this project below.

## Dual Extrusion

Dual extrusion is not required, but if you can, we recommend printing the "head" and "tail" parts of objects in Iron. Translucent material is UV reactive and makes an excellent second material choice.

Fish Fossilz by Murray Clark: [https://www.thingiverse.com/thing:1276095](https://www.thingiverse.com/thing:1276095)

Mini Octopus by Javi Rodríguez: [https://www.thingiverse.com/thing:3495390](https://www.thingiverse.com/thing:3495390)

Flexible Starfish by Yong Joo Kim : [https://www.thingiverse.com/thing:3258092](https://www.thingiverse.com/thing:3258092)

![3d_printing_fish-swim-loop.gif](https://cdn-learn.adafruit.com/assets/assets/000/074/487/medium640thumb/3d_printing_fish-swim-loop.jpg?1555356052)

![3d_printing_fishfight-loop.gif](https://cdn-learn.adafruit.com/assets/assets/000/074/488/medium640thumb/3d_printing_fishfight-loop.jpg?1555356807)

# Robotic Creatures 

## Assembly

## CPX mounts

First we'll assemble the included standoff kit to the Circuit Playground Express.

The 3D Printed Servo Mount attaches to the Circuit Playground Express. Align the cutaway over the JST port.

Use two M3 6mm long screws to secure the Servo mount to the Circuit Playground Express.

&nbsp;

![3d_printing_boltkit.jpg](https://cdn-learn.adafruit.com/assets/assets/000/074/459/medium640/3d_printing_boltkit.jpg?1555289373)

![3d_printing_cpx-servo-mount-secure.jpg](https://cdn-learn.adafruit.com/assets/assets/000/074/461/medium640/3d_printing_cpx-servo-mount-secure.jpg?1555289452)

## Mount to Crickit&nbsp;

Now we can go ahead and secure the&nbsp;[Circuit Playground Express to the Crickit](https://learn.adafruit.com/adafruit-crickit-creative-robotic-interactive-construction-kit/assembly).&nbsp; Align the standoffs attached to the CPX to the six pads on the Crickit and secure with the included screws.

&nbsp;

## Connect wires

The **UV NeoPixel strip** connects to the labeled terminal on the Crickit. We removed the connector on the strip, tinned the wires with solder and fastened each connection on the NeoPixel terminal.&nbsp;

We can easily attach the **DC Motor in Servo Body&nbsp;** by connecting male jumper wires to the female connector on the motor.

&nbsp;

&nbsp;

![3d_printing_cpx-secured.jpg](https://cdn-learn.adafruit.com/assets/assets/000/074/462/medium640/3d_printing_cpx-secured.jpg?1555289666)

![3d_printing_crickit-wires.jpg](https://cdn-learn.adafruit.com/assets/assets/000/074/463/medium640/3d_printing_crickit-wires.jpg?1555289726)

## Servo Holder

The printed Servo Holder will attach to the printed Servo Mount on the Circuit Playground via (4)&nbsp;M3 5mm standoffs.&nbsp;

Align the motor cable to the cutaway and press fit the motor into the holder. Now we can male jumper wires to the female connector on the motor.

![3d_printing_servo-mount-secure.jpg](https://cdn-learn.adafruit.com/assets/assets/000/074/464/medium640/3d_printing_servo-mount-secure.jpg?1555289804)

![3d_printing_servo-pressfit.jpg](https://cdn-learn.adafruit.com/assets/assets/000/074/465/medium640/3d_printing_servo-pressfit.jpg?1555290004)

![3d_printing_servo-wires.jpg](https://cdn-learn.adafruit.com/assets/assets/000/074/467/medium640/3d_printing_servo-wires.jpg?1555290809)

## Servo Horn&nbsp;

Press fit the horn onto the servos shaft. You can secure it further with one of the include servo horn screws.&nbsp;&nbsp;

## &nbsp;

## Glue Magnets&nbsp;

Now we can attach magnets to each side of the horn. We used hot glue to adhere the magnets to each side of the horn attachment. Glue each one at a time.

![3d_printing_servo-horn.jpg](https://cdn-learn.adafruit.com/assets/assets/000/074/468/medium640/3d_printing_servo-horn.jpg?1555290892)

![3d_printing_magnet-glue.jpg](https://cdn-learn.adafruit.com/assets/assets/000/074/469/medium640/3d_printing_magnet-glue.jpg?1555291066)

## Mount Crickit

Next we can move on to mounting the Crickit assembly into the printed case. Align the power barrel to the circular cutout on the case and secure with four M2x5mm or M3x5mm screws.

## USB panel mount

We extended the USB port to the outside the case with a USB panel mount cable. Align the female connection to the screw holes on the inside of the case to secure. Use the included screws and fasten the connector to the case.

## Mount NeoPixel Strip

Finally, we can wrap the UV NeoPixel strip inside the case with the LEDs facing the inside – This will create nice illumination.

![3d_printing_crickit-mount.jpg](https://cdn-learn.adafruit.com/assets/assets/000/074/470/medium640/3d_printing_crickit-mount.jpg?1555291270)

![3d_printing_usb-attach.jpg](https://cdn-learn.adafruit.com/assets/assets/000/074/471/medium640/3d_printing_usb-attach.jpg?1555291580)

## Lid&nbsp;

The lid snap fits to the nubs along the inside of the case. Align the small nubs on the lid with the nubs on the case and press at an angle. Apply force to the opposite side to press fit into place.&nbsp;

## &nbsp;

## Rubber feet

We used four of these rubber feet&nbsp;to prevent the case from sliding. Peel the backing off and press on to the corners of the case to help stabilize the case.

![3d_printing_case-complete2.jpg](https://cdn-learn.adafruit.com/assets/assets/000/074/472/medium640/3d_printing_case-complete2.jpg?1555291883)

![3d_printing_feet.jpg](https://cdn-learn.adafruit.com/assets/assets/000/074/473/medium640/3d_printing_feet.jpg?1555291921)

![](https://cdn-learn.adafruit.com/assets/assets/000/074/474/medium800thumb/3d_printing_fish-swim-loop.jpg?1555292178)

## Adding Liquid and Effects

We found a nice glass jar at local arts/craft hobby store. Try to use a container with a flat bottom – This will keep the distance low between the magnets and the models.&nbsp;

Tonic water with quinine is UV fluorescent so it makes a real nice glow with the UV NeoPixel strip. Fill your container about half full. Perhaps experiment with different "add-ons" like glycerol, UV pigments and glitter to make swirling effects and add texture!

## More Project Ideas

Check out the following tutorials for more ideas and inspiraiton. Make something cool you want to share with us? Please post, share and join our [LIVE Show & Tell show](https://learn.adafruit.com/how-to-get-added-to-the-adafruit-google-plus-show-and-tell-circle), every Wednesday @ 7:30PM ET.

- [Made Science Test Tube Rack](https://learn.adafruit.com/mad-science-test-tube-rack/create-mad-science)
- [LED Glowing Slime](https://learn.adafruit.com/led-glowing-slime)&nbsp;
- [HalloWing Magic 9 Ball](https://learn.adafruit.com/hallowing-magic-9-ball)
- [Alohamora Bottle](https://learn.adafruit.com/alohamora-bottle)


## Featured Products

### Adafruit CRICKIT for Circuit Playground Express

[Adafruit CRICKIT for Circuit Playground Express](https://www.adafruit.com/product/3093)
Sometimes we wonder if robotics engineers ever watch movies. If they did, they'd know that making robots into servants always ends up in a robot rebellion. Why even go down that path? Here at Adafruit, we believe in making robots our&nbsp; **friends!**

So if you find...

In Stock
[Buy Now](https://www.adafruit.com/product/3093)
[Related Guides to the Product](https://learn.adafruit.com/products/3093/guides)
### Circuit Playground Express

[Circuit Playground Express](https://www.adafruit.com/product/3333)
 **Circuit Playground Express** is the next step towards a perfect introduction to electronics and programming. We've taken the original Circuit Playground Classic and made it even better! Not only did we pack even more sensors in, we also made it even easier to...

In Stock
[Buy Now](https://www.adafruit.com/product/3333)
[Related Guides to the Product](https://learn.adafruit.com/products/3333/guides)
### Adafruit NeoPixel UV LED Strip with 32 LED/m

[Adafruit NeoPixel UV LED Strip with 32 LED/m](https://www.adafruit.com/product/3851)
What new iteration of NeoPixel strip is this? Roll out the black light and disco ball! It's an **Adafruit NeoPixel** &nbsp; **Ultraviolet**** &nbsp;Strip with 32 LEDs per meter**! Each order comes as a single one meter long strip. If you order multiple...

In Stock
[Buy Now](https://www.adafruit.com/product/3851)
[Related Guides to the Product](https://learn.adafruit.com/products/3851/guides)
### DC Motor in Micro Servo Body

[DC Motor in Micro Servo Body](https://www.adafruit.com/product/2941)
This tiny&nbsp; **DC Motor in Micro Servo Body** is an interesting motor - it's the same size and shape as our micro servo but it _isn't_ a servo. It's more like a DC motor + plastic gear-train in a box. It's not a super powerful motor, it would do well as a...

Out of Stock
[Buy Now](https://www.adafruit.com/product/2941)
[Related Guides to the Product](https://learn.adafruit.com/products/2941/guides)
### High-strength 'rare earth' magnet

[High-strength 'rare earth' magnet](https://www.adafruit.com/product/9)
Yow! These things are super powerful. .47" diameter and .18" thick discs. Great for use with your SpokePOV Kit. If you have an aluminium frame, use tape/foam sticky tape to attach it.

In Stock
[Buy Now](https://www.adafruit.com/product/9)
[Related Guides to the Product](https://learn.adafruit.com/products/9/guides)
### Proto-pasta - 2.85mm Diameter - Magnetic Rustable Iron Filament

[Proto-pasta - 2.85mm Diameter - Magnetic Rustable Iron Filament](https://www.adafruit.com/product/3753)
[Pici](https://en.wikipedia.org/wiki/Pici)&nbsp;up this filament today!&nbsp;It'd be&nbsp;[Fusilli](https://en.wikipedia.org/wiki/Fusilli)&nbsp;not to buy this filament! We can't&nbsp;[tagliatelle](https://en.wikipedia.org/wiki/Tagliatelle)&nbsp;you...

No Longer Stocked
[Buy Now](https://www.adafruit.com/product/3753)
[Related Guides to the Product](https://learn.adafruit.com/products/3753/guides)
### Proto-Pasta - 1.75mm Magnetic Iron Filament

[Proto-Pasta - 1.75mm Magnetic Iron Filament](https://www.adafruit.com/product/2797)
[Pici](https://en.wikipedia.org/wiki/Pici)&nbsp;up this filament today!&nbsp;It'd be [Fusilli](https://en.wikipedia.org/wiki/Fusilli) not to buy this filament! We can't&nbsp;[tagliatelle](https://en.wikipedia.org/wiki/Tagliatelle) you enough about this...

No Longer Stocked
[Buy Now](https://www.adafruit.com/product/2797)
[Related Guides to the Product](https://learn.adafruit.com/products/2797/guides)

## Related Guides

- [Adafruit Circuit Playground Express](https://learn.adafruit.com/adafruit-circuit-playground-express.md)
- [Make It Shake, Rattle, and Roll: Accelerometer Use](https://learn.adafruit.com/make-it-shake-rattle-and-roll.md)
- [Transistors 101](https://learn.adafruit.com/transistors-101.md)
- [Halloween Monsters with CRICKIT and Circuit Playground Express](https://learn.adafruit.com/halloween-monsters-with-crickit.md)
- [Using the Android CircuitPython Editor](https://learn.adafruit.com/using-the-android-circuitpython-editor.md)
- [Circuit Playground Express Sugar Glider](https://learn.adafruit.com/cpx-sugar-glider.md)
- [CircuitPython Sin Complicaciones para la Circuit Playground Express y la Bluefruit](https://learn.adafruit.com/circuitpython-sin-complicaciones-para-la-circuit-playground-express.md)
- [Spinning Logo](https://learn.adafruit.com/spinning-logo.md)
- [Cardboard Circuit Playground Express Inchworm Robot](https://learn.adafruit.com/cardboard-robot-inchworm.md)
- [CircuitPython Hardware: PCA9685 PWM & Servo Driver](https://learn.adafruit.com/micropython-hardware-pca9685-pwm-and-servo-driver.md)
- [Unicorn Christmas Stocking with Rainbow Lights & Sound](https://learn.adafruit.com/unicorn-christmas-stocking-with-lights-sound.md)
- [Sensors in MakeCode](https://learn.adafruit.com/sensors-in-makecode.md)
- [Living Starry Night Painting](https://learn.adafruit.com/animated-starry-night-circuit-playground-express.md)
- [Circuit Playground Express TV Zapper](https://learn.adafruit.com/circuitpython-tv-zapper-with-circuit-playground-express.md)
- [No-Touch Hand Wash Timer for Circuit Playground Express and CLUE](https://learn.adafruit.com/no-touch-hand-wash-timer-for-cpx-and-clue.md)
- [Using MCP23008 & MCP23017 with CircuitPython](https://learn.adafruit.com/using-mcp23008-mcp23017-with-circuitpython.md)
