# Halloween Sentry-Bot with CRICKIT for CPX

## Overview

This sentry robot will wait quietly for someone to pass by, then it springs to life! A lot of fun anytime or make it especially for Halloween.

Using MakeCode drag and drop blocks you will make a scary monster that can protect all your precious, precious candy.

In addition to basic programming concepts, this guide also demonstrates the construction of a simple mechanical movement, translating rotary motion into linear motion.

![](https://cdn-learn.adafruit.com/assets/assets/000/062/959/medium800thumb/makecode_Sentry_hero.jpg?1538597557)

# The Electronics

This project uses the following items from the Adafruit store:

### 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: Adafruit CRICKIT for Circuit Playground Express
quantity: 1
Creative Robotics and Interactive Construction Kit is an add-on to our popular Circuit Playground Express that lets you #MakeRobotFriend using CircuitPython
[Adafruit CRICKIT for Circuit Playground Express](https://www.adafruit.com/product/3093)

### Part: Micro Servo
quantity: 1
This little servo can rotate approximately 180 degrees (90 in each direction). Works just like standard servos you're used to but smaller.
[Micro Servo](https://www.adafruit.com/product/169)

### Part: DC Gearbox Motor - "TT Motor" - 200RPM - 3 to 6VDC
quantity: 1
TT DC Gearbox Motor with a gear ratio of 1:48 and 2 x 200mm wires with breadboard-friendly 0.1" male connectors
[DC Gearbox Motor - "TT Motor" - 200RPM - 3 to 6VDC](https://www.adafruit.com/product/3777)

### Part: Eccentric Hub for TT Motor
quantity: 1
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: USB cable - A/MicroB - 3ft
quantity: 1
Standard A to micro-B USB cable
[USB cable - A/MicroB - 3ft](https://www.adafruit.com/product/592)

### Part: Alkaline AA batteries - 3 pack
quantity: 1
These batteries are good quality at a good price, and work fantastic with any of the kits or projects that use AAs.
[Alkaline AA batteries - 3 pack](https://www.adafruit.com/product/3521)

### Part: 3xAA holder with DC jack
quantity: 1
Battery holder 3xAA batteries with 2.1mm DC jack
[3xAA holder with DC jack](https://www.adafruit.com/product/3842)

# Tools & Materials

For this project you will need these materials:

- Clear plastic cup
- Scrap cardboard
- Double sided tape
- Pipe cleaners
- Googly eyes

And these tools:

- Hobby knife
- Tweezers (or something pointy)
- Screwdriver
- Scissors
- Hot glue gun

![](https://cdn-learn.adafruit.com/assets/assets/000/062/356/medium800/makecode_IMG_0565.jpg?1537554863)

- [Next Page](https://learn.adafruit.com/halloween-sentry-bot/the-circuit.md)

## 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)
### 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...

Out of Stock
[Buy Now](https://www.adafruit.com/product/3093)
[Related Guides to the Product](https://learn.adafruit.com/products/3093/guides)
### DC Gearbox Motor - "TT Motor" - 200RPM - 3 to 6VDC

[DC Gearbox Motor - "TT Motor" - 200RPM - 3 to 6VDC](https://www.adafruit.com/product/3777)
Perhaps you've been assembling a new robot friend, adding&nbsp;a computer for a brain and other fun personality touches. Now the time has come to let it leave the nest and fly on its own wings– err, _wheels!_&nbsp;

These durable (but affordable!) plastic gearbox motors...

Out of Stock
[Buy Now](https://www.adafruit.com/product/3777)
[Related Guides to the Product](https://learn.adafruit.com/products/3777/guides)
### USB cable - USB A to Micro-B

[USB cable - USB A to Micro-B](https://www.adafruit.com/product/592)
This here is your standard A to micro-B USB cable, for USB 1.1 or 2.0. Perfect for connecting a PC to your Metro, Feather, Raspberry Pi or other dev-board or microcontroller

Approximately 3 feet / 1 meter long

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

[Micro servo](https://www.adafruit.com/product/169)
Tiny little servo can rotate approximately 180 degrees (90 in each direction) and works just like the standard kinds you're used to but _smaller_. You can use any servo code, hardware, or library to control these servos. Good for beginners who want to make stuff move without...

Out of Stock
[Buy Now](https://www.adafruit.com/product/169)
[Related Guides to the Product](https://learn.adafruit.com/products/169/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...

Out of Stock
[Buy Now](https://www.adafruit.com/product/3880)
[Related Guides to the Product](https://learn.adafruit.com/products/3880/guides)
### 3 x AA Battery Holder with 2.1mm Plug

[3 x AA Battery Holder with 2.1mm Plug](https://www.adafruit.com/product/3842)
Here's another addition to our growing family of&nbsp;[AA battery holders](https://www.adafruit.com/category/563).&nbsp;A&nbsp;holder for three (3) AA batteries! It's got&nbsp;an 8" long power cable with a 2.1mm DC jack at the end, and, oh yes, it's in classy...

In Stock
[Buy Now](https://www.adafruit.com/product/3842)
[Related Guides to the Product](https://learn.adafruit.com/products/3842/guides)
### Alkaline AA batteries (LR6) - 3 pack

[Alkaline AA batteries (LR6) - 3 pack](https://www.adafruit.com/product/3521)
Battery power for your portable project! These batteries are good quality at a good price, and work fantastic with any of the kits or projects in the shop that use AAs. This is a pack of **3 AA batteries**.  
  
These batteries are Alkaline (MnO2) chemistry, with a voltage...

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

## Related Guides

- [Adafruit Circuit Playground Express](https://learn.adafruit.com/adafruit-circuit-playground-express.md)
- [Crawling Baby Sea Turtle Robot](https://learn.adafruit.com/baby-turtle-makecode.md)
- [Circuit Playground + CircuitPython Quickstart Guide](https://learn.adafruit.com/circuit-playground-express-circuitpython-5-minute-guide.md)
- [HalloWing Light Paintstick](https://learn.adafruit.com/hallowing-light-paintstick.md)
- [Circuit Playground Express Rocket Lamp](https://learn.adafruit.com/cpx-rocket-lamp.md)
- [CRICKIT WobblyBot](https://learn.adafruit.com/crickit-wobblybot.md)
- [Snap Fit Mount for Circuit Playground Express](https://learn.adafruit.com/snap-fit-mount-for-circuit-playground-express.md)
- [UART Communication Between Two CircuitPython Boards](https://learn.adafruit.com/uart-communication-between-two-circuitpython-boards.md)
- [DAC Hacks for Circuit Playground Express & other ATSAMD21 Boards](https://learn.adafruit.com/circuit-playground-express-dac-hacks.md)
- [Fidget Spinner Tachometer](https://learn.adafruit.com/fidget-spinner-tachometer.md)
- [Circuit Playground Hot Potato](https://learn.adafruit.com/circuit-playground-hot-potato.md)
- [Circuit Playground Powerpuff Girls Valentine](https://learn.adafruit.com/circuit-playground-valentine.md)
- [Infrared Receive and Transmit with Circuit Playground Express](https://learn.adafruit.com/infrared-ir-receive-transmit-circuit-playground-express-circuit-python.md)
- [Using the Android CircuitPython Editor](https://learn.adafruit.com/using-the-android-circuitpython-editor.md)
- [Crickit Harmonic Drawing Machine](https://learn.adafruit.com/crickit-harmonic-drawing-machine.md)
- [Pearl's Gem Weapon – Steven Universe](https://learn.adafruit.com/pearl-s-spear-steven-universe.md)
