# Crawling Animatronic Hand

## Overview

This guide shows you how to make an creepy animatronic crawling hand. It uses a glove from a halloween costume, outfitted with a servo motor and a Circuit Playground Express.

This hand is designed to pull itself along the floor slowly, waiting until it finds a cold, dark spot, at which point it will stop and wait until temperature and light increase.&nbsp;&nbsp;

![](https://cdn-learn.adafruit.com/assets/assets/000/063/321/medium800thumb/robotics___cnc_IMG_8390.2018-10-09_17_22_14.jpg?1539126699)

The right glove is essential for this project. If you don't happen to have a candidate on hand, you can find [Zombie](https://www.amazon.com/dp/B009PF49FS/ref=cm_sw_r_tw_dp_U_x_dhuVBbV6EGKCN) gloves online.

## Parts Used
### Part: Circuit Playground Express
quantity: 1
Circuit Playground Express is the perfect introduction to electronics and programming
[Circuit Playground Express](https://www.adafruit.com/product/3333)

### Part: Alligator Clip to Breadboard Wires
quantity: 3
These compact jumper cables have a premium male header on one end and a grippy mini alligator clip on the other.
[Alligator Clip to Breadboard Wires](https://www.adafruit.com/product/3448)

### Part: Micro USB cable
quantity: 1
Standard A to micro-B USB cable - 3ft
[Micro USB cable](https://www.adafruit.com/product/592)

### Part: Eccentric Hub for TT Motor
quantity: 2
This eccentric motor hub has 2 hexagonal holes and 2 circular holes which allow you to quickly and easily mount custom wheels, cardboard &amp; wood, or other mechanisms to your robot project.
[Eccentric Hub for TT Motor](https://www.adafruit.com/product/3880)

### Part: High Torque Metal Gear Servo
quantity: 1
High-torque standard servo with metal gearing for extra-high torque and reliability. It can rotate at least 120 degrees with a classic 1.5-2.5ms pulse.
[High Torque Metal Gear Servo](https://www.adafruit.com/product/1142)

### Part: Lithium Ion Polymer Battery - 3.7v 2500mAh
quantity: 1
Thin, light and powerful battery with an output range from 4.2V when completely charged to 3.7V. This battery has a capacity of 2500mAh for a total of ~10 Wh.
[Lithium Ion Polymer Battery - 3.7v 2500mAh](https://www.adafruit.com/product/328)

## Tools & Materials

Once you've found the glove you want to use, make sure to grab the following as well:

- Scissors
- Cardboard
- [Double sided foam tape](https://www.amazon.com/dp/B003W0R4PE/ref=cm_sw_r_tw_dp_U_x_Y2SGBb4DV10TX)
- Hot glue gun
- Hobby knife
- Fishing line or string

# Crawling Animatronic Hand

## Prepare the Hand

It is recommended, though not required, that you stiffen your glove with some cardboard. Depending on the stiffness and elasticity of your gloves this may or may not be necessary.

If your gloves are already very stiff and springy, skip this first step.

Cut a rectangle of cardboard approximately the same dimensions of your glove.

&nbsp;

Cut out an outline of the glove.

&nbsp;

Bend the cardboard into shape so it can be inserted into the glove (baby powder can help). This will stiffen it and help the fingers spring back into shape.

![robotics___cnc_IMG_8404.jpg](https://cdn-learn.adafruit.com/assets/assets/000/063/328/medium640/robotics___cnc_IMG_8404.jpg?1539129191)

![robotics___cnc_IMG_8407.jpg](https://cdn-learn.adafruit.com/assets/assets/000/063/329/medium640/robotics___cnc_IMG_8407.jpg?1539129203)

![robotics___cnc_IMG_7551.jpg](https://cdn-learn.adafruit.com/assets/assets/000/063/330/medium640/robotics___cnc_IMG_7551.jpg?1539129213)

Mark placement of holes on wrist

&nbsp;

Poke holes with tweezers or something else pointy.

&nbsp;

Push fishing line through holes.

&nbsp;

Thread 5 short sections of coffee straw (or pen tube cut to length) over fishing line and into the holes in the wrist. This will allow the string to slide freely back and forth.

![robotics___cnc_IMG_7550.jpg](https://cdn-learn.adafruit.com/assets/assets/000/063/322/medium640/robotics___cnc_IMG_7550.jpg?1539128820)

![robotics___cnc_IMG_7771.jpg](https://cdn-learn.adafruit.com/assets/assets/000/063/323/medium640/robotics___cnc_IMG_7771.jpg?1539128863)

![robotics___cnc_IMG_7773.jpg](https://cdn-learn.adafruit.com/assets/assets/000/063/324/medium640/robotics___cnc_IMG_7773.jpg?1539128904)

![robotics___cnc_IMG_7775.jpg](https://cdn-learn.adafruit.com/assets/assets/000/063/325/medium640/robotics___cnc_IMG_7775.jpg?1539128943)

![robotics___cnc_IMG_8436.jpg](https://cdn-learn.adafruit.com/assets/assets/000/063/374/medium640/robotics___cnc_IMG_8436.jpg?1539199331)

![robotics___cnc_IMG_8434.jpg](https://cdn-learn.adafruit.com/assets/assets/000/063/377/medium640/robotics___cnc_IMG_8434.jpg?1539199514)

![robotics___cnc_IMG_8437.jpg](https://cdn-learn.adafruit.com/assets/assets/000/063/376/medium640/robotics___cnc_IMG_8437.jpg?1539199480)

Poke holes through the tips of each finger.

&nbsp;

Thread fishing line through these holes.

&nbsp;

Use tape or a knot to keep the line from pulling back through holes.

![robotics___cnc_IMG_8075.jpg](https://cdn-learn.adafruit.com/assets/assets/000/063/326/medium640/robotics___cnc_IMG_8075.jpg?1539128997)

![robotics___cnc_IMG_8076.jpg](https://cdn-learn.adafruit.com/assets/assets/000/063/327/medium640/robotics___cnc_IMG_8076.jpg?1539129007)

![robotics___cnc_IMG_8314.jpg](https://cdn-learn.adafruit.com/assets/assets/000/063/332/medium640/robotics___cnc_IMG_8314.jpg?1539129499)

![robotics___cnc_IMG_8079.jpg](https://cdn-learn.adafruit.com/assets/assets/000/063/334/medium640/robotics___cnc_IMG_8079.jpg?1539129624)

## Your hand is now ready to be animated!

Leave the fishing line going through the fingers long, it can be tied off and cut to length once everything else is attached.&nbsp;

![](https://cdn-learn.adafruit.com/assets/assets/000/063/331/medium800/robotics___cnc_IMG_8081.jpg?1539129459)

# Crawling Animatronic Hand

## Understanding the Code

Before moving forward, let's take a moment to look at the code for this project.

The code was created using&nbsp; **Microsoft MakeCode for Adafruit** , a web-based code editor. MakeCode 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,&nbsp;[this guide is a good place to start](https://learn.adafruit.com/makecode/downloading-and-flashing?embeds=allow).

## Getting into Bootloader Mode

To make your board work with MakeCode we need to put it into "bootloader mode". All that's required to do this is to&nbsp; **connect the board to your computer** &nbsp;with a micro USB cable and&nbsp; **click the small reset button** &nbsp;in the center of the board.&nbsp;

![](https://cdn-learn.adafruit.com/assets/assets/000/063/314/medium800thumb/robotics___cnc_circuit_playground_projects_CPX_bootloader_mode.jpg?1539117205)

![](https://cdn-learn.adafruit.com/assets/assets/000/063/313/medium800/robotics___cnc_Screen_Shot_2018-10-09_at_4.31.40_PM.png?1539117146)

Click&nbsp;[this link](https://makecode.adafruit.com/01633-63925-35554-63329)&nbsp;or the button below to enter the portal to interact with the code for this project.

[Open the program in MakeCode](https://makecode.adafruit.com/01633-63925-35554-63329)
## How to Upload Code

To upload code, connect you Circuit Playground Express to your computer using the micro USB cable, click the&nbsp; **Download** &nbsp;button to download the **&nbsp;.uf2 file** &nbsp;to your computer, and&nbsp; **drag 'n drop that .UF2 file onto the CPLAYBOOT** &nbsp;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!

## Connect Servo

Once your code is uploaded, plug the alligator clip to pin wires into the servo connector such that you have three alligator clips with the wires going to the servo harness.

Connect your servo motor to your Circuit Playground Express using the alligator clips.

- Connect the **red** middle wire from the servo to **Vout** on the CPX
- Connect the **black** or **brown** wire from the servo to **GND**
- Connect the **yellow** or **white** wire from the servo to **A1**

![robotics___cnc_CPX___1_servo_bb.png](https://cdn-learn.adafruit.com/assets/assets/000/063/415/medium640/robotics___cnc_CPX___1_servo_bb.png?1539303844)

You should see your motor start rotating 180 degrees, with a pause, before rotating back again.

![](https://cdn-learn.adafruit.com/assets/assets/000/063/395/medium800thumb/robotics___cnc_servo_running.jpg?1539205315)

## What This Code Does

This simple sketch tells your animatronic hand to look for a cool, dark place to hide. It does this by telling the motor to run until two conditions are both met.

In the&nbsp;`forever`&nbsp;block there is a&nbsp;`while`&nbsp;statement, instructing the Circuit Playground Express to run the servo unless:

- The&nbsp;`temperature`&nbsp;goes below the specified threshold (in this case, 20 degrees Celsius)
- The&nbsp;`light level`&nbsp;goes below the specified value (in this case,&nbsp;`100`).&nbsp;

You can test this code by turning off the lights and cooling down the thermistor on the board (I used a quick blast from a can of compressed air).

![](https://cdn-learn.adafruit.com/assets/assets/000/063/393/medium800thumb/robotics___cnc_cold_air_effect.jpg?1539205298)

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.

## Troubleshooting

**Problem** : My servo motor isn't responding!

**Solution** : Make sure that you have the servo's wires connected to the correct pads. The brown wire should go to GND, the yellow wire to A1, and the red wire to VOUT.

&nbsp;

**Problem:&nbsp;** My Circuit Playground Express doesn't show up as&nbsp; **CPLAYBOOT**!

**Solution:&nbsp;** Your Circuit Playground Express board comes ready to work with CircuitPython, and will show up as a flash drive named&nbsp; **CIRCUITPY** &nbsp;the first time it's connected to your computer. To switch over to work with MakeCode,&nbsp; **connect the board to your computer** &nbsp;with a micro USB cable and&nbsp; **click the small reset button** &nbsp;in the center of the board.&nbsp;&nbsp;

# Crawling Animatronic Hand

## Connect the Servo Motor

## Motor Housing

Now that the code is tested, it's time to put everything together. To mount the motor inside the wrist, we will house it inside a short section of cardboard tube. A tube 2.5 to 3 inches wide is ideal, as long as it fits comfortably inside the wrist of your glove.&nbsp;

## Make a platform

&nbsp;

Cut a section of cardboard tube about 3-4 inches long.

&nbsp;

Cut a small rectangle of cardboard. This will be the platform for the servo motor.

&nbsp;

Use hot glue or tape to mount cardboard platform inside tube.

![robotics___cnc_IMG_8288.jpg](https://cdn-learn.adafruit.com/assets/assets/000/063/335/medium640/robotics___cnc_IMG_8288.jpg?1539130116)

![robotics___cnc_IMG_8292.jpg](https://cdn-learn.adafruit.com/assets/assets/000/063/336/medium640/robotics___cnc_IMG_8292.jpg?1539130125)

![robotics___cnc_IMG_8295.jpg](https://cdn-learn.adafruit.com/assets/assets/000/063/338/medium640/robotics___cnc_IMG_8295.jpg?1539130141)

![robotics___cnc_IMG_8296.jpg](https://cdn-learn.adafruit.com/assets/assets/000/063/339/medium640/robotics___cnc_IMG_8296.jpg?1539130151)

## Glue the Servo Motor

&nbsp;

Test-fit the servo motor inside the tube.

&nbsp;

Cut another small rectangle of cardboard and bend this into an isosceles triangle (3 equal sides).

&nbsp;

Glue this in place inside the tube, pressed up against the side of the motor.

&nbsp;

![robotics___cnc_IMG_8297.jpg](https://cdn-learn.adafruit.com/assets/assets/000/063/340/medium640/robotics___cnc_IMG_8297.jpg?1539130263)

![robotics___cnc_IMG_8301.jpg](https://cdn-learn.adafruit.com/assets/assets/000/063/341/medium640/robotics___cnc_IMG_8301.jpg?1539130295)

![robotics___cnc_IMG_8303.jpg](https://cdn-learn.adafruit.com/assets/assets/000/063/342/medium640/robotics___cnc_IMG_8303.jpg?1539130309)

![robotics___cnc_IMG_8311.jpg](https://cdn-learn.adafruit.com/assets/assets/000/063/343/medium640/robotics___cnc_IMG_8311.jpg?1539130453)

Push the bundle of fishing line through the last hole in the servo motor arm.

&nbsp;

Depending on the line you are using, you may need to widen the hole.

&nbsp;

Hold lines in place with tape or a dab of hot glue.

![robotics___cnc_IMG_8440.jpg](https://cdn-learn.adafruit.com/assets/assets/000/063/380/medium640/robotics___cnc_IMG_8440.jpg?1539200989)

![robotics___cnc_IMG_8441.jpg](https://cdn-learn.adafruit.com/assets/assets/000/063/382/medium640/robotics___cnc_IMG_8441.jpg?1539201551)

![robotics___cnc_IMG_8442.jpg](https://cdn-learn.adafruit.com/assets/assets/000/063/383/medium640/robotics___cnc_IMG_8442.jpg?1539201757)

![robotics___cnc_Screen_Shot_2018-10-10_at_3.31.18_PM.png](https://cdn-learn.adafruit.com/assets/assets/000/063/384/medium640/robotics___cnc_Screen_Shot_2018-10-10_at_3.31.18_PM.png?1539201831)

## Test!

Plug your battery in and check to make sure the servo moves easily back and forth within the tube.

The lines should still be left relatively long at this point. We will tighten them up in the next step.

![](https://cdn-learn.adafruit.com/assets/assets/000/063/344/medium800thumb/robotics___cnc_IMG_8322.2018-10-09_11_19_13.jpg?1539130670)

# Crawling Animatronic Hand

## Make It Roll

If you'd like to give your hand the freedom to wander, these next steps will show you how to add a simple axle and ratchet mechanism to the hand.

## Making an Axle&nbsp;

&nbsp;

Using a metal rod (or bamboo skewer) as an axle, we can make a rolling base for our hand.

&nbsp;

Poke or drill a hole through the base of the cardboard tube.

&nbsp;

Push a small straw through this hole.

&nbsp;

Insert the axle through the straw.

&nbsp;

Press the other wheel onto the end of axle.

![robotics___cnc_IMG_8329.jpg](https://cdn-learn.adafruit.com/assets/assets/000/063/345/medium640/robotics___cnc_IMG_8329.jpg?1539130896)

![robotics___cnc_IMG_8328.jpg](https://cdn-learn.adafruit.com/assets/assets/000/063/346/medium640/robotics___cnc_IMG_8328.jpg?1539130928)

![robotics___cnc_IMG_8330.jpg](https://cdn-learn.adafruit.com/assets/assets/000/063/347/medium640/robotics___cnc_IMG_8330.jpg?1539130937)

![robotics___cnc_IMG_8331.jpg](https://cdn-learn.adafruit.com/assets/assets/000/063/348/medium640/robotics___cnc_IMG_8331.jpg?1539131094)

## Making a Ratchet

&nbsp;

Using the tips of some bamboo skewers, we can make a ratchet that will prevent the wheels from rolling backwards.

&nbsp;

This will ensure that the hand only crawls forward, not backward.

&nbsp;

Use hot glue to brace these pins against the inner lip of the wheel so that it catches the notches as they rotate.

![robotics___cnc_IMG_8333.jpg](https://cdn-learn.adafruit.com/assets/assets/000/063/350/medium640/robotics___cnc_IMG_8333.jpg?1539131224)

![robotics___cnc_IMG_8335.jpg](https://cdn-learn.adafruit.com/assets/assets/000/063/351/medium640/robotics___cnc_IMG_8335.jpg?1539131266)

![robotics___cnc_IMG_8340.jpg](https://cdn-learn.adafruit.com/assets/assets/000/063/352/medium640/robotics___cnc_IMG_8340.jpg?1539131316)

![robotics___cnc_IMG_8339.jpg](https://cdn-learn.adafruit.com/assets/assets/000/063/353/medium640/robotics___cnc_IMG_8339.jpg?1539131336)

## Wrap It Up

&nbsp;

Tape the battery to the end of the wrist. Make sure the servo arm still has enough clearance to move forward/backward!

&nbsp;

Use a square of double sided tape to stick the Circuit Playground Express the to back of battery.

![robotics___cnc_IMG_8327.jpg](https://cdn-learn.adafruit.com/assets/assets/000/063/399/medium640/robotics___cnc_IMG_8327.jpg?1539207445)

![robotics___cnc_IMG_0613.jpg](https://cdn-learn.adafruit.com/assets/assets/000/063/400/medium640/robotics___cnc_IMG_0613.jpg?1539207457)

## Spook Your Friends
![](https://cdn-learn.adafruit.com/assets/assets/000/063/366/medium800thumb/robotics___cnc_IMG_8430.jpg?1539191952)

You may find your hand moves better on certain surfaces, depending on how slippery they are.

If you'd like to give your hand more grip, adding a thin layer of glue to the wheels and a dab of glue to the tips of the fingers helps.

![](https://cdn-learn.adafruit.com/assets/assets/000/063/397/medium800thumb/robotics___cnc_Diptic.2018-10-10_17_21_34.jpg?1539206538)

The battery that powers this hand should last a long while. If you need to recharge it, [look at this guide](https://learn.adafruit.com/li-ion-and-lipoly-batteries) to learn how to do it safely, and all about how LiPoly batteries work!&nbsp;


## Featured Products

### 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)
### Standard Size - High Torque - Metal Gear Servo

[Standard Size - High Torque - Metal Gear Servo](https://www.adafruit.com/product/1142)
This high-torque standard servo now comes in a metal-gear flavor, for extra-high torque (10 kg\*cm!) and reliability! It can rotate at least 120 degrees (60 in each direction) with a classic 1.5-2.5ms pulse, but if you can extend your pulses it can go up to about 170 degrees - it varies a bit...

Out of Stock
[Buy Now](https://www.adafruit.com/product/1142)
[Related Guides to the Product](https://learn.adafruit.com/products/1142/guides)
### Eccentric Hub for TT Motors

[Eccentric Hub for TT Motors](https://www.adafruit.com/product/3880)
We really enjoy our DC gear motors (a.k.a "TT Motor") but unless you have a 3D printer it can be a challenge to get something attached to the axle. That's why we've got this **Eccentric** &nbsp; **TT Motor Hub** - it gives you 2 x hexagonal...

In Stock
[Buy Now](https://www.adafruit.com/product/3880)
[Related Guides to the Product](https://learn.adafruit.com/products/3880/guides)
### Lithium Ion Polymer Battery - 3.7v 2500mAh

[Lithium Ion Polymer Battery - 3.7v 2500mAh](https://www.adafruit.com/product/328)
Lithium-ion polymer (also known as 'lipo' or 'lipoly') batteries are thin, light, and powerful. The output ranges from 4.2V when completely charged to 3.7V. This battery has a capacity of **2500mAh** for a total of about 10 Wh. If you need a smaller battery, <a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/328)
[Related Guides to the Product](https://learn.adafruit.com/products/328/guides)
### Small Alligator Clip to Male Jumper Wire Bundle - 6 Pieces

[Small Alligator Clip to Male Jumper Wire Bundle - 6 Pieces](https://www.adafruit.com/product/3448)
When working&nbsp;with unusual non-header-friendly surfaces, these handy cables will be your best friends! No longer will you have long, cumbersome strands of alligator clips. These compact jumper cables have a premium male header on one end and a grippy mini alligator clip on the...

Out of Stock
[Buy Now](https://www.adafruit.com/product/3448)
[Related Guides to the Product](https://learn.adafruit.com/products/3448/guides)

## Related Guides

- [Adafruit Circuit Playground Express](https://learn.adafruit.com/adafruit-circuit-playground-express.md)
- [CRICKIT Exhibit Demo Board](https://learn.adafruit.com/crickit-exhibit-demo-board.md)
- [CircuitPython Hardware: LED Backpacks & FeatherWings](https://learn.adafruit.com/micropython-hardware-led-backpacks-and-featherwings.md)
- [Paper Airplane Launcher](https://learn.adafruit.com/paper-airplane-launcher-with-crickit.md)
- [Make It Log](https://learn.adafruit.com/make-it-data-log-spreadsheet-circuit-playground.md)
- [Glowing Bottle Castle and Capacitive Touch Piano](https://learn.adafruit.com/glowing-bottle-castle-and-capacitive-touch-piano.md)
- [The Tilt Trumpet](https://learn.adafruit.com/the-tilt-trumpet.md)
- [Circuit Playground Analog Input](https://learn.adafruit.com/circuit-playground-analog-input.md)
- [Bunny Ears with MakeCode](https://learn.adafruit.com/bunny-ears-with-makecode.md)
- [Pushrod Garage](https://learn.adafruit.com/pushrod-garage.md)
- [Circuit Playground Express Spinner Game in MakeCode](https://learn.adafruit.com/circuit-playground-makecode-spinner-game.md)
- [Adafruit Circuit Playground Tri-Color E-Ink Gizmo](https://learn.adafruit.com/adafruit-circuit-playground-tri-color-e-ink-gizmo.md)
- [TFT Gizmo Animated Eye](https://learn.adafruit.com/tft-gizmo-animated-eye.md)
- [CircuitPython Hardware: SSD1306 OLED Display](https://learn.adafruit.com/micropython-hardware-ssd1306-oled-display.md)
- [What is Web MIDI & BLE MIDI?](https://learn.adafruit.com/web-ble-midi.md)
- [Glowing Slime Lunchbox](https://learn.adafruit.com/glowing-slime-lunchbox.md)
