# CRICKIT Exhibit Demo Board

## Overview

https://youtu.be/6BBGaGaLzZU

This project shows how to connect a series of buttons, sensors, NeoPixel LED lights, motors, a speaker and more to showcase all the awesome things [CRICKIT](https://learn.adafruit.com/adafruit-crickit-creative-robotic-interactive-construction-kit?view=all) can do!

![](https://cdn-learn.adafruit.com/assets/assets/000/071/977/medium800/makecode_IMG_2223.jpg?1551207754)

This project provides an excellent and entertaining demonstration of the wide variety of functions that CRICKIT for Circuit Playground Express can perform.

![](https://cdn-learn.adafruit.com/assets/assets/000/072/279/medium800thumb/makecode_CRICKIT_Exhibit_480.2019-03-04_18_44_25.jpg?1551804932)

# Electronics
Featured
### 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)
![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)

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

Out of 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)

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

In Stock
[Buy Now](https://www.adafruit.com/product/592)
[Related Guides to the Product](https://learn.adafruit.com/products/592/guides)
![USB cable - USB A to Micro-B - 3 foot long](https://cdn-shop.adafruit.com/640x480/592-01.jpg)

### 5V 2A (2000mA) switching power supply - UL Listed

[5V 2A (2000mA) switching power supply - UL Listed](https://www.adafruit.com/product/276)
This is an FCC/CE certified and UL listed power supply. Need a lot of 5V power? This switching supply gives a clean regulated 5V output at up to 2000mA. 110 or 240 input, so it works in any country. The plugs are "US 2-prong" style so you may need a plug adapter, but you can pick one...

In Stock
[Buy Now](https://www.adafruit.com/product/276)
[Related Guides to the Product](https://learn.adafruit.com/products/276/guides)
![Angled shot of power supply.](https://cdn-shop.adafruit.com/640x480/276-06.jpg)

### Arcade Button - 30mm Translucent Red

[Arcade Button - 30mm Translucent Red](https://www.adafruit.com/product/473)
A button is a button, and a switch is a switch, but these translucent arcade buttons are in a class of their own. They're the same size as common arcade controls (often referred to as 30mm diameter) but have some nice things going for them that justify the extra dollar.  
  
First,...

In Stock
[Buy Now](https://www.adafruit.com/product/473)
[Related Guides to the Product](https://learn.adafruit.com/products/473/guides)
![Angled shot of a translucent red round 30mm arcade button. ](https://cdn-shop.adafruit.com/640x480/473-00.jpg)

### Premium Male/Male Jumper Wires - 20 x 12" (300mm)

[Premium Male/Male Jumper Wires - 20 x 12" (300mm)](https://www.adafruit.com/product/1955)
These Male/Male Jumper Wires are handy for making wire harnesses or jumpering between headers on PCB's. These premium jumper wires are 12" (300mm) long and come in a 'strip' of 20 (2 pieces of each of ten rainbow colors). They have 0.1" male header contacts on either end...

In Stock
[Buy Now](https://www.adafruit.com/product/1955)
[Related Guides to the Product](https://learn.adafruit.com/products/1955/guides)
![Premium Male/Male Jumper Wires - 20 x 12 (300mm) folded over](https://cdn-shop.adafruit.com/640x480/1955-02.jpg)

### Mini Push-Pull Solenoid - 5V

[Mini Push-Pull Solenoid - 5V](https://www.adafruit.com/product/2776)
Solenoids are basically electromagnets: they are made of a coil of copper wire with an armature (a slug of metal) in the middle. When the coil is energized, the slug is pulled into the center of the coil. This makes the solenoid able to pull (from one end) or push (from the other).

This...

In Stock
[Buy Now](https://www.adafruit.com/product/2776)
[Related Guides to the Product](https://learn.adafruit.com/products/2776/guides)
![Mini Push-Pull Solenoid wired to Trinket, activating back and forth](https://cdn-shop.adafruit.com/product-videos/640x480/2776-07.jpg)

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

In Stock
[Buy Now](https://www.adafruit.com/product/169)
[Related Guides to the Product](https://learn.adafruit.com/products/169/guides)
![Micro servo with three pin cable](https://cdn-shop.adafruit.com/640x480/169-06.jpg)

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

In Stock
[Buy Now](https://www.adafruit.com/product/3777)
[Related Guides to the Product](https://learn.adafruit.com/products/3777/guides)
![DC Gearbox Motor - TT Motor with two long wires and yellow body](https://cdn-shop.adafruit.com/640x480/3777-00.jpg)

### Thin White Wheel for TT DC Gearbox Motors - 65mm Diameter

[Thin White Wheel for TT DC Gearbox Motors - 65mm Diameter](https://www.adafruit.com/product/3763)
We're keepin' it&nbsp;_wheel_ with this one! Plastic gear-box motors (also known as 'TT' motors) are an easy and low cost way to get your projects moving. But we've noticed that there are not a lot of nice TT motor&nbsp;_wheels&nbsp;_to go along with...

Out of Stock
[Buy Now](https://www.adafruit.com/product/3763)
[Related Guides to the Product](https://learn.adafruit.com/products/3763/guides)
![Thin White Wheel for TT DC Gearbox Motors](https://cdn-shop.adafruit.com/640x480/3763-00.jpg)

### 5V Electromagnet - 5 Kg Holding Force

[5V Electromagnet - 5 Kg Holding Force](https://www.adafruit.com/product/3873)
Ever wanted to [feel like Magneto](https://www.youtube.com/watch?v=2VmqIwB11yE)? Well, now you sort-of can! Bring the ferromagnetic objects in the world under your control with an **Electromagnet**

The simplest way to make an electromagnet is to get a solenoid,...

In Stock
[Buy Now](https://www.adafruit.com/product/3873)
[Related Guides to the Product](https://learn.adafruit.com/products/3873/guides)
![Solenoid holding up a medium wrench, then releasing it](https://cdn-shop.adafruit.com/product-videos/640x480/3873-04.jpg)

### Mono Enclosed Speaker - 3W 4 Ohm

[Mono Enclosed Speaker - 3W 4 Ohm](https://www.adafruit.com/product/3351)
Listen up! This 2.8" x 1.2" speaker&nbsp;is&nbsp;a&nbsp;great addition to any audio project where you need 4 ohm impedance and 3W or less of power. We particularly like this&nbsp;speaker&nbsp;as it is&nbsp;small and enclosed for good audio volume and quality. It has a handy JST 2PH...

In Stock
[Buy Now](https://www.adafruit.com/product/3351)
[Related Guides to the Product](https://learn.adafruit.com/products/3351/guides)
![Enclosed Speaker with JST cable](https://cdn-shop.adafruit.com/640x480/3351-01.jpg)

### Adafruit NeoPixel LED Strip w/ Alligator Clips - 30 LEDs/meter

[Adafruit NeoPixel LED Strip w/ Alligator Clips - 30 LEDs/meter](https://www.adafruit.com/product/3812)
Adding glowy color to your projects has never been easier: no more soldering or stripping wires, clip 'em on and glow! This **Adafruit NeoPixel LED Strip with Alligator Clips** has **30 total LEDs in a "30 LED per meter" spacing** , and is 1 meter long,...

In Stock
[Buy Now](https://www.adafruit.com/product/3812)
[Related Guides to the Product](https://learn.adafruit.com/products/3812/guides)
![Adafruit NeoPixel LED 1 meter Strip with Alligator Clips wired to Circuit Playground, lighting up rainbow](https://cdn-shop.adafruit.com/product-videos/640x480/3812-06.jpg)

### Panel Mount 1K potentiometer (Breadboard Friendly)

[Panel Mount 1K potentiometer (Breadboard Friendly)](https://www.adafruit.com/product/1789)
This **1K** potentiometer is a two-in-one, good in a breadboard or with a panel. It's a fairly standard linear taper 1K ohm potentiometer, with a grippy shaft. It's smooth and easy to turn, but not so loose that it will shift on its own. We like this one because the legs are...

In Stock
[Buy Now](https://www.adafruit.com/product/1789)
[Related Guides to the Product](https://learn.adafruit.com/products/1789/guides)
![Potentiometer installed into breadboard](https://cdn-shop.adafruit.com/640x480/1789-01.jpg)

### Potentiometer Knob - Soft Touch T18 - White

[Potentiometer Knob - Soft Touch T18 - White](https://www.adafruit.com/product/2047)
_Oh say can you see_  
_By the knob's early light..._

Sorry - we thought that was clever. &nbsp;And while it wasn't really, this potentiometer knob definitely is. &nbsp;It's a...

In Stock
[Buy Now](https://www.adafruit.com/product/2047)
[Related Guides to the Product](https://learn.adafruit.com/products/2047/guides)
![Group Shot of the Various Color Options to the Potentiometer Knob - Soft Touch T18 - White.](https://cdn-shop.adafruit.com/640x480/2047-07.jpg)

### Conductive Nylon Fabric Tape - 5mm Wide x 10 meters long

[Conductive Nylon Fabric Tape - 5mm Wide x 10 meters long](https://www.adafruit.com/product/3961)
With our fun assortment of&nbsp;[conductive materials](https://www.adafruit.com/category/190),&nbsp;[cosplay](https://www.adafruit.com/index.php?main_page=category&cPath=290)&nbsp;and&nbsp;[wearables](https://www.adafruit.com/category/65)&nbsp;have never...

Out of Stock
[Buy Now](https://www.adafruit.com/product/3961)
[Related Guides to the Product](https://learn.adafruit.com/products/3961/guides)
![Conductive Nylon Fabric Tape - 5mm Wide](https://cdn-shop.adafruit.com/640x480/3961-00.jpg)

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

In Stock
[Buy Now](https://www.adafruit.com/product/3448)
[Related Guides to the Product](https://learn.adafruit.com/products/3448/guides)
![Group of Small Alligator Clip to Male Jumper Wires](https://cdn-shop.adafruit.com/640x480/3448-00.jpg)

## Other Materials
- A large cardboard box
- Scrap corrugated cardboard
- [Hot glue gun](https://www.amazon.com/dp/B006IY359K/ref=cm_sw_r_tw_dp_U_x_K0DeCbCR4A6B5)
- [Hot glue sticks](https://www.amazon.com/Surebonder-PRO2-100-Watt-High-Temperature/dp/B00627G6QC/ref=sr_1_6?s=hi&ie=UTF8&qid=1548380526&sr=1-6&keywords=10+inch+glue+sticks)&nbsp;
- A bell
- A protractor (optional)
- [Double sided tape](https://www.amazon.com/dp/B003W0R4PE/ref=cm_sw_r_tw_dp_U_x_Y2SGBb4DV10TX)
- Hobby knife
- Aluminum foil (can use in place of conductive tape above!)

# CRICKIT Exhibit Demo Board

## Circuit Diagram

Before building the box and mounting the components, it's a good idea to wire up the electronics and make sure everything is working!

![](https://cdn-learn.adafruit.com/assets/assets/000/072/062/medium800/makecode_Crickit_Exhibit_bb.png?1551312079)

## Buttons

- In "Signal I/O" on CRICKIT, connect the wires of one button to signal and GND&nbsp;(doesn't matter which is which) on **input 1**
- Repeat for second button on **input 2**

## Potentiometer

- Orient potentiometer or "pot" like in the diagram above.
- Connect alligator clip from **middle pi** n of the pot to **signal** on **input 8**
- Connect alligator clip from **left pin** of the pot to **3.3V** &nbsp;on&nbsp; **input 8**
- Connect alligator clip from **right pin** of the pot to **GND** on **input 8**

## Capacitive Touch

- Connect alligator clip from **capacitive touch input 1** on CRICKIT to conductive tape.

## NeoPixels

- Connect alligator clip from **5V** on the NeoPixel strip to a breadboard wire then insert and screw down that wire to **5V** on the **NeoPixel input** on CRICKIT.
- Repeat for **Data** and **GND** wires.

## Speaker

- Connect speaker wire to CRICKIT **speaker input** (orientation does not matter)

## DC Motor

- Connect DC motor wires to CRICKIT **Motor input 1** (orientation does not matter)

## Electromagnet and Solenoid

- On the CRICKIT Drive section, screw in one cable from each the solenoid **and** the electromagnet into **5V**
- Screw in the other cables to **Drive inputs 1 and 2** for the solenoid and the electromagnet respectively.

## The Servo

- Plug in the servo to **Servo input 1** on the CRICKIT with the **brown wire facing inward towards the CRICKIT**.

![](https://cdn-learn.adafruit.com/assets/assets/000/071/827/medium800/makecode_IMG_2060.jpg?1550869306)

# CRICKIT Exhibit Demo Board

## CircuitPython Code

## Getting to know CircuitPython

[CircuitPython](https://learn.adafruit.com/welcome-to-circuitpython/what-is-circuitpython)&nbsp;is a programming language based on Python, one of the fastest growing programming languages in the world. It is specifically designed to simplify experimenting and learning to code on low-cost microcontroller boards.

CircuitPython is easiest to use within the Mu Editor. If you haven't previously used Mu,&nbsp;[this guide will get you started](https://learn.adafruit.com/welcome-to-circuitpython/installing-mu-editor).

If you've never used Circuit Playground Express (CPX) with CRICKIT before, make sure you've updated it with the latest&nbsp;special Crickit/seesaw version of the Circuit Playground Express firmware.&nbsp;[This guide will show you how](https://learn.adafruit.com/adafruit-crickit-creative-robotic-interactive-construction-kit/circuitpython-code).

![](https://cdn-learn.adafruit.com/assets/assets/000/071/913/medium800/makecode_circuitpython_circuit_playground_adafruit_blinka_computer.png?1551139389)

## Preparing your Board

To get your CRICKIT for CPX set up to run this code, follow these steps:

1) Install the&nbsp;[latest CircuitPython for CRICKIT&nbsp;](https://github.com/adafruit/circuitpython/releases/tag/3.1.2)from the CircuitPython GitHub page

2) Get the&nbsp;[latest 4.0 library pack](https://github.com/adafruit/Adafruit_CircuitPython_Bundle/releases/), unzip it, and drag the&nbsp;library **simpleio.mpy** over into the&nbsp; **/lib** &nbsp;folder on&nbsp; **CIRCUITPY**. If there is no **lib** directory, create one to put the file into.

More info on installing libraries [here](https://learn.adafruit.com/adafruit-circuit-playground-express/circuitpython-libraries).

- Find the simplio library in the library pack as **simplio.mpy**

![makecode_Screen_Shot_2019-03-01_at_7.29.14_PM.png](https://cdn-learn.adafruit.com/assets/assets/000/072/174/medium640/makecode_Screen_Shot_2019-03-01_at_7.29.14_PM.png?1551486691)

- Drag to the lib folder in the **CIRCUITPY** drive

![makecode_image.png](https://cdn-learn.adafruit.com/assets/assets/000/072/173/medium640/makecode_image.png?1551486780)

Info: Before continuing make sure your board's **lib** folder has the **simplio** library copied over.

## Uploading

Make sure you've connected the Circuit Playground Express to your computer (mac/PC/Linux) via a known good USB A to micro-B cable. Your board should show up as a flash disk drive named&nbsp; **CIRCUITPY** &nbsp;(If you see a disk name&nbsp; **CPLAYBOOT** , try pressing the reset button again. If the only drive name you get is named&nbsp; **CPLAYBOOT** , CircuitPython may not be loaded on the board. You can load CircuitPython as&nbsp;[per this guide](https://learn.adafruit.com/adafruit-circuit-playground-express)).

Once your board is connected, copy&nbsp; **code.py** &nbsp;from the window below and paste it into Mu.&nbsp;Press the&nbsp; **Save** &nbsp;button and your code should automatically be saved to the&nbsp; **CIRCUITPY** &nbsp;disk drive (which appears when the Circuit Playground Express is plugged into your computer) as&nbsp; **code.py**.&nbsp;

https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/Crickits/Crickit_Exhibit/code.py

![](https://cdn-learn.adafruit.com/assets/assets/000/072/064/medium800/makecode_image.png?1551312867)

Info: Make sure the file saved to **CIRCUITPY** is named **code.py**, this will allow it to run automatically when your CPX is powered on.

## Test It Out

Go ahead and test out the code! What happens?

The following should occur:

- Hit a button to trigger a solenoid
- Hit a button to turn on an electromagnet
- Touch conductive tape to trigger a NeoPixel animation
- Turn a potentiometer to control a servo
- Shine light on the CPX to trigger and change the speed of a DC motor
- Hit both buttons to trigger a sound from the speaker!

## Troubleshooting

**Problem** : I get an error in the REPL that says "map\_range undefined"

**Solution** : Make sure simplio library is installed! Info on installing libraries [here](https://learn.adafruit.com/adafruit-circuit-playground-express/circuitpython-libraries).

&nbsp;

**Problem** : My Circuit Playground Express isn't recognized by Mu!

**Solution** : Make sure your board is set up with CircuitPython, which has the Circuit Playground Express show up as a flash drive named&nbsp; **CIRCUITPY** &nbsp;when you connect the CPX to your computer. If it is showing up as&nbsp; **CPLAYBOOT** &nbsp;on your computer, you can&nbsp;[follow the steps in this guide](https://learn.adafruit.com/adafruit-circuit-playground-express/circuitpython-quickstart)&nbsp;to ensure CircuitPython is loaded and you see the&nbsp; **CIRCUITPY** &nbsp;drive.

## &nbsp;

**Problem** : My buttons don't work!

**Solution** :&nbsp;Make sure you've updated the&nbsp;[CircuitPython firmware for CRICKIT&nbsp;](https://learn.adafruit.com/adafruit-crickit-creative-robotic-interactive-construction-kit/circuitpython-code)from the&nbsp;CRICKIT guide.

&nbsp;

**Problem** : Nothing is moving!

**Solution** : Check that your Circuit Playground Express is connected to a 5V power supply and the small slide switch on **&nbsp;** CRICKIT is set to "ON". Be sure the lightest servo wire faces away from the CRICKIT board, the darkest (black.brown) is closest to the center of CRICKIT.

# CRICKIT Exhibit Demo Board

## Prepare the Box

Find yourself a large, flat box, with enough surface area to accommodate all the electronics you want to mount on it.&nbsp;

![](https://cdn-learn.adafruit.com/assets/assets/000/071/826/medium800/makecode_IMG_2056.jpg?1550869285)

At this point, it's a good idea to lay out your electronics to get an idea for how they'll fit when mounted.

Some choices about where to arrange certain items must be made at this point, giving consideration to the placement of CRICKIT's various plugs and terminal blocks.

![](https://cdn-learn.adafruit.com/assets/assets/000/071/914/medium800/makecode_IMG_2060.jpg?1551140108)

## Sketch out placement of holes

&nbsp;

Trace outlines of where you will need holes on cardboard box.

The holes cut in the box with make routing the cables to and from CRICKIT easy to organize.

![makecode_IMG_1211.jpg](https://cdn-learn.adafruit.com/assets/assets/000/071/915/medium640/makecode_IMG_1211.jpg?1551140174)

![makecode_IMG_2075.jpg](https://cdn-learn.adafruit.com/assets/assets/000/071/916/medium640/makecode_IMG_2075.jpg?1551140309)

Warning: 

## Cut out holes

&nbsp;

Use something sharp (like a pen tip or tweezers) to poke&nbsp; holes.

Use a box cutter to cut out the larger rectangular holes.

![makecode_IMG_2076.jpg](https://cdn-learn.adafruit.com/assets/assets/000/071/929/medium640/makecode_IMG_2076.jpg?1551198532)

![makecode_IMG_2078.jpg](https://cdn-learn.adafruit.com/assets/assets/000/071/930/medium640/makecode_IMG_2078.jpg?1551198545)

![makecode_IMG_1212.jpg](https://cdn-learn.adafruit.com/assets/assets/000/071/931/medium640/makecode_IMG_1212.jpg?1551198554)

Your box should now be ready to install CRICKIT and all its assorted electronics.

![](https://cdn-learn.adafruit.com/assets/assets/000/071/932/medium800/makecode_IMG_2079.jpg?1551198573)

# CRICKIT Exhibit Demo Board

## Making Connections

## Buttons

&nbsp;

Screw [arcade buttons](https://www.adafruit.com/category/757) into holes in the box.

Connect the button terminals to CRICKIT's Signal port using [male-to-male jumper wires](https://www.adafruit.com/product/1957) plugged into the [quick connect wires](https://www.adafruit.com/product/1152).

&nbsp;

&nbsp;

![makecode_IMG_2057.jpg](https://cdn-learn.adafruit.com/assets/assets/000/071/828/medium640/makecode_IMG_2057.jpg?1550869336)

![makecode_IMG_2059.jpg](https://cdn-learn.adafruit.com/assets/assets/000/071/829/medium640/makecode_IMG_2059.jpg?1550869383)

![makecode_IMG_2086.jpg](https://cdn-learn.adafruit.com/assets/assets/000/071/830/medium640/makecode_IMG_2086.jpg?1550869427)

![makecode_IMG_2104.jpg](https://cdn-learn.adafruit.com/assets/assets/000/071/831/medium640/makecode_IMG_2104.jpg?1550869437)

These buttons can be configured to control other things connected to CRICKIT, like the electromagnet and solenoid.

![](https://cdn-learn.adafruit.com/assets/assets/000/072/300/medium800thumb/makecode_buttons.jpg?1551808552)

## NeoPixel Strip

&nbsp;

Feed the&nbsp;[NeoPixel strip](https://www.adafruit.com/product/3811) through hole in box.

Hold the strip in place with sections of double sided foam tape.

![makecode_IMG_2091.jpg](https://cdn-learn.adafruit.com/assets/assets/000/071/832/medium640/makecode_IMG_2091.jpg?1550869472)

![makecode_IMG_2093.jpg](https://cdn-learn.adafruit.com/assets/assets/000/071/833/medium640/makecode_IMG_2093.jpg?1550869484)

![makecode_IMG_2094.jpg](https://cdn-learn.adafruit.com/assets/assets/000/071/834/medium640/makecode_IMG_2094.jpg?1550869590)

![makecode_IMG_2095.jpg](https://cdn-learn.adafruit.com/assets/assets/000/071/835/medium640/makecode_IMG_2095.jpg?1550869629)

## Capacitive Touch

&nbsp;

Place a line of [conductive tape](https://www.adafruit.com/product/3961) on the box, leaving a small section at the end free to connect to an alligator clip.

![makecode_IMG_2085.jpg](https://cdn-learn.adafruit.com/assets/assets/000/072/034/medium640/makecode_IMG_2085.jpg?1551298962)

When touched, this capacitive strip can be used to trigger things such as NeoPixel animations.

![](https://cdn-learn.adafruit.com/assets/assets/000/072/323/medium800thumb/makecode_cap_touch.2019-03-05_16_01_13.jpg?1551819699)

## Potentiometer

&nbsp;

Install the&nbsp;[potentiometer](https://www.adafruit.com/product/1789), screwing it tightly into place

Connect [alligator clips](https://www.adafruit.com/product/3255) to the terminals of the potentiometer inside the box.

Press the [potentiometer knob](https://www.adafruit.com/product/2047) into place.

![makecode_IMG_2096.jpg](https://cdn-learn.adafruit.com/assets/assets/000/072/035/medium640/makecode_IMG_2096.jpg?1551299021)

![makecode_IMG_2097.jpg](https://cdn-learn.adafruit.com/assets/assets/000/072/036/medium640/makecode_IMG_2097.jpg?1551299055)

![makecode_IMG_2098.jpg](https://cdn-learn.adafruit.com/assets/assets/000/072/037/medium640/makecode_IMG_2098.jpg?1551299087)

![makecode_IMG_2115.jpg](https://cdn-learn.adafruit.com/assets/assets/000/072/038/medium640/makecode_IMG_2115.jpg?1551299116)

## Servo Motor

&nbsp;

Press servo motor through rectangular hole, hold in place with a couple dabs of hot glue if necessary.

A protractor can make a fun addition as an angle indicator, or draw your own indicator directly on the box.

Cut an arrow out of paper and tape this to the servo arm, then press onto the servo horn.

![makecode_IMG_2082.jpg](https://cdn-learn.adafruit.com/assets/assets/000/072/319/medium640/makecode_IMG_2082.jpg?1551815178)

![makecode_IMG_2080.jpg](https://cdn-learn.adafruit.com/assets/assets/000/072/320/medium640/makecode_IMG_2080.jpg?1551815220)

![makecode_IMG_2083.jpg](https://cdn-learn.adafruit.com/assets/assets/000/072/321/medium640/makecode_IMG_2083.jpg?1551815234)

The potentiometer in this example is connected to the servo motor, allowing the user to control the angle of the motor arm by turning the potentiometer knob.

![](https://cdn-learn.adafruit.com/assets/assets/000/072/324/medium800thumb/makecode_servo_motor.2019-03-05_16_05_23.jpg?1551820182)

## DC Motor

&nbsp;

Screw the&nbsp;[DC motor](https://www.adafruit.com/product/3777) into place. If bolts aren't handy, a square of double-sided tape works just as well.

Affix a wheel to the hub of the motor.

&nbsp;

&nbsp;

![makecode_IMG_2088.jpg](https://cdn-learn.adafruit.com/assets/assets/000/072/039/medium640/makecode_IMG_2088.jpg?1551299453)

![makecode_IMG_2089.jpg](https://cdn-learn.adafruit.com/assets/assets/000/072/040/medium640/makecode_IMG_2089.jpg?1551299485)

![makecode_YCES3686.jpg](https://cdn-learn.adafruit.com/assets/assets/000/072/041/medium640/makecode_YCES3686.jpg?1551299542)

For this project, the DC motor is used as a brightness indicator, increasing in speed in accordance with data received from the light sensor onboard Circuit Playground Express.&nbsp;

![](https://cdn-learn.adafruit.com/assets/assets/000/072/298/medium800thumb/makecode_DC_motor.jpg?1551808502)

## Solenoid

&nbsp;

Use a small square of double sided foam tape to stick the solenoid to the box.

A bell taken from a generic [hotel bell](https://www.amazon.com/dp/B0769WH8F2/ref=cm_sw_r_tw_dp_U_x_etWDCbNH2GQWP)&nbsp;or bike bell works great when paired with this mini solenoid.

![makecode_IMG_2121.jpg](https://cdn-learn.adafruit.com/assets/assets/000/072/043/medium640/makecode_IMG_2121.jpg?1551303941)

![makecode_IMG_2322.jpg](https://cdn-learn.adafruit.com/assets/assets/000/072/316/medium640/makecode_IMG_2322.jpg?1551812106)

The solenoid can be triggered by a button press, and used to tap a bell or tuning fork to make it ring.

![](https://cdn-learn.adafruit.com/assets/assets/000/072/296/medium800thumb/makecode_solenoid.jpg?1551808483)

## Electromagnet

&nbsp;

Use a small piece of cardboard to hold the [electromagnet](https://www.adafruit.com/product/3873) perpendicular to the surface of the box.

Screw the wires coming out of the electromagnet into the Drive terminals on CRICKIT.

![makecode_OIUH3603.jpg](https://cdn-learn.adafruit.com/assets/assets/000/072/045/medium640/makecode_OIUH3603.jpg?1551304882)

![makecode_IMG_2105.jpg](https://cdn-learn.adafruit.com/assets/assets/000/072/046/medium640/makecode_IMG_2105.jpg?1551304892)

![makecode_IMG_2106.jpg](https://cdn-learn.adafruit.com/assets/assets/000/072/047/medium640/makecode_IMG_2106.jpg?1551304899)

The electromagnet generates a magnetic field current is run through it, and loses its magnetism when the current is cut off. A nail or other sufficiently large piece of metal works well as an indicator for when the electromagnet is on or off.

![](https://cdn-learn.adafruit.com/assets/assets/000/072/297/medium800thumb/makecode_electromagnet.jpg?1551808490)

## Speaker

&nbsp;

The small [mono enclosed speaker](https://www.adafruit.com/product/3351) can be stuck in place with double-sided tape, or connected with bolts to the box.

![makecode_IMG_2117.jpg](https://cdn-learn.adafruit.com/assets/assets/000/072/044/medium640/makecode_IMG_2117.jpg?1551304741)

Pressing two buttons at once can perform a different function that either button on its own, like in this example, playing sound through the speaker.

![](https://cdn-learn.adafruit.com/assets/assets/000/072/325/medium800thumb/makecode_double_button.2019-03-05_16_09_16.jpg?1551820194)


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

Out of 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...

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

In Stock
[Buy Now](https://www.adafruit.com/product/592)
[Related Guides to the Product](https://learn.adafruit.com/products/592/guides)
### 5V 2A (2000mA) switching power supply - UL Listed

[5V 2A (2000mA) switching power supply - UL Listed](https://www.adafruit.com/product/276)
This is an FCC/CE certified and UL listed power supply. Need a lot of 5V power? This switching supply gives a clean regulated 5V output at up to 2000mA. 110 or 240 input, so it works in any country. The plugs are "US 2-prong" style so you may need a plug adapter, but you can pick one...

In Stock
[Buy Now](https://www.adafruit.com/product/276)
[Related Guides to the Product](https://learn.adafruit.com/products/276/guides)
### Arcade Button - 30mm Translucent Yellow

[Arcade Button - 30mm Translucent Yellow](https://www.adafruit.com/product/474)
A button is a button, and a switch is a switch, but these translucent arcade buttons are in a class of their own. They're the same size as common arcade controls (often referred to as 30mm diameter) but have some nice things going for them that justify the extra dollar.  
  
First,...

No Longer Stocked
[Buy Now](https://www.adafruit.com/product/474)
[Related Guides to the Product](https://learn.adafruit.com/products/474/guides)
### Arcade Button - 30mm Translucent Red

[Arcade Button - 30mm Translucent Red](https://www.adafruit.com/product/473)
A button is a button, and a switch is a switch, but these translucent arcade buttons are in a class of their own. They're the same size as common arcade controls (often referred to as 30mm diameter) but have some nice things going for them that justify the extra dollar.  
  
First,...

In Stock
[Buy Now](https://www.adafruit.com/product/473)
[Related Guides to the Product](https://learn.adafruit.com/products/473/guides)
### Premium Male/Male Jumper Wires - 20 x 12" (300mm)

[Premium Male/Male Jumper Wires - 20 x 12" (300mm)](https://www.adafruit.com/product/1955)
These Male/Male Jumper Wires are handy for making wire harnesses or jumpering between headers on PCB's. These premium jumper wires are 12" (300mm) long and come in a 'strip' of 20 (2 pieces of each of ten rainbow colors). They have 0.1" male header contacts on either end...

In Stock
[Buy Now](https://www.adafruit.com/product/1955)
[Related Guides to the Product](https://learn.adafruit.com/products/1955/guides)
### Small Alligator Clip Test Lead (set of 12)

[Small Alligator Clip Test Lead (set of 12)](https://www.adafruit.com/product/1008)
Connect this to that without soldering using these handy mini alligator clip test leads. 15" cables with alligator clip on each end, color coded. You get 12 pieces in 6 colors. Strong and grippy, these always come in handy! We often use these in conjunction with a multimeter so we...

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

## Related Guides

- [Adafruit Circuit Playground Express](https://learn.adafruit.com/adafruit-circuit-playground-express.md)
- [No-Code IoT CO2 "Canary In a Coalmine"](https://learn.adafruit.com/iot-canary.md)
- [Infrared Hand Gesture Robot Control Glove](https://learn.adafruit.com/cpx-ir-infrared-hand-gesture-robot-control-glove.md)
- [NeoTrellis Tabletop RPG Soundboard](https://learn.adafruit.com/neotrellis-dungeon-crawl-soundboard.md)
- [Mouse and Keyboard Control Using TinyUSB and BLE](https://learn.adafruit.com/mouse-and-keyboard-control-using-tinyusb-and-ble.md)
- [NYE Circuit Playground Drop](https://learn.adafruit.com/nye-circuit-playground-drop.md)
- [Adafruit MOSFET Driver](https://learn.adafruit.com/adafruit-mosfet-driver.md)
- [NeoTrellis M4 Memory Game](https://learn.adafruit.com/neotrellis-m4-memory-game.md)
- [CircuitScheme - Lisp on CircuitPython](https://learn.adafruit.com/scheme-in-circuitpython.md)
- [CompuCanvas 101 - Transitions](https://learn.adafruit.com/compucanvas-101.md)
- [Floor Lamp with NeoPixels and WLED Custom Animations](https://learn.adafruit.com/floor-lamp-with-wled.md)
- [Paper Craft Zoetrope with Crickit](https://learn.adafruit.com/paper-craft-zoetrope-with-circuit-python.md)
- [Sound Reactive Paper Lanterns with LedFx](https://learn.adafruit.com/sound-reactive-paper-lanterns-with-led-fx.md)
- [Adafruit BrainCraft HAT - Easy Machine Learning for Raspberry Pi](https://learn.adafruit.com/adafruit-braincraft-hat-easy-machine-learning-for-raspberry-pi.md)
- [AtariFruit 2600 Joystick](https://learn.adafruit.com/atarifruit-2600-joystick.md)
- [PyPortal Event Countdown Clock](https://learn.adafruit.com/pyportal-event-countdown-clock.md)
