# Introducing Adafruit Crickit #MakeRobotFriend

## Overview

![](https://cdn-learn.adafruit.com/assets/assets/000/053/971/medium800/circuit_playground_3093_iso_CP_ORIG_2018_05.jpg?1526492482)

Sometimes we wonder if robotics engineers ever watch movies. If they did, they'd know that making robots into slaves always ends up in a robot rebellion. Why even go down that path? Here at Adafruit we believe in making robots our&nbsp; **friends!**

![](https://cdn-learn.adafruit.com/assets/assets/000/053/972/medium800/circuit_playground_3093_quarter_01_ORIG_2018_05.jpg?1526492495)

So if you find yourself wanting a companion, consider the robot. They're fun to program, and you can get creative with decorations.

With that in mind, we designed **Crickit** - That's our **C** reative **R** obotics & **I** nteractive **C** onstruction **Kit**. It's an add-on to our popular Circuit Playground Express that lets you **#MakeRobotFriend** using CircuitPython, MakeCode (coming soon), or Arduino.

Bolt on your Circuit Playground using the included stand-off bolts and start controlling motors, servos, solenoids. You also get signal pins, capacitive touch sensors, a NeoPixel driver and amplified speaker output. It complements & extends the Circuit Playground so you can still use all the goodies on the CPX, but now you have a robotics playground as well.

Here are the three Crickit versions available:

&nbsp;

Crickit for Circuit Playground Express

&nbsp;

Crickit for Feather

&nbsp;

Crickit for micro:bit

&nbsp;

Crickit HAT for Raspberry Pi

![circuit_playground_3093_top_CP_ORIG_2018_05.jpg](https://cdn-learn.adafruit.com/assets/assets/000/053/974/medium640/circuit_playground_3093_top_CP_ORIG_2018_05.jpg?1536162969)

![circuit_playground_3343-06.jpg](https://cdn-learn.adafruit.com/assets/assets/000/060/956/medium640/circuit_playground_3343-06.jpg?1536163202)

![circuit_playground_3928-01.jpg](https://cdn-learn.adafruit.com/assets/assets/000/061/005/medium640/circuit_playground_3928-01.jpg?1536181923)

![circuit_playground_Capture.jpg](https://cdn-learn.adafruit.com/assets/assets/000/068/897/medium640/circuit_playground_Capture.jpg?1546984327)

The Crickit is powered by seesaw, our I2C-to-whatever bridge firmware. So you only need to use two data pins to control the huge number of inputs and outputs on the Crickit. All those timers, PWMs, sensors are offloaded to the co-processor.

You get:

- 4 x Analog or Digital Servo control, with precision 16-bit timers
- 2 x Bi-directional brushed DC motor control, 1 Amp current limited each, with 8-bit PWM speed control (or one stepper)
- 4 x High current "Darlington" 500mA drive outputs with kick-back diode protection. For solenoids, relays, large LEDs, or one uni-polar stepper
- 4 x Capacitive touch sensors with alligator-pads
- 8 x Signal pins, digital in/out or analog inputs
- 1 x NeoPixel driver with 5V level shifter
- 1 x Class D, 4-8 ohm speaker, 3W-max audio amplifier

All are powered via 5V DC, so you can use any 5V-powered servos, DC motors, steppers, solenoids, relays etc. To keep things simple and safe, we don't support mixing voltages, so only 5V, not for use with 9V or 12V robotic components.

![](https://cdn-learn.adafruit.com/assets/assets/000/053/973/medium800/circuit_playground_3093_top_01_ORIG_2018_05.jpg?1526492507)

Since you'll be working with high-current devices, we wanted to have a good solid power supply system that minimizes risk of damage. The power supply has an ['eFuse' management chip](http://www.ti.com/product/TPS2595) that will automatically turn off if the voltage goes above 5.5V or below 3V and has over-current protection at 4A. Every motor driver has kick-back protection. We think this is a nice and durable board for robotics!

# Introducing Adafruit Crickit #MakeRobotFriend

## Crickit Tour

Primary: 

![](https://cdn-learn.adafruit.com/assets/assets/000/053/951/medium800/circuit_playground_3093_top_01_ORIG_2018_05.jpg?1526488250)

# Power Input
Your project start here, where power comes into the Crickit and is then used to control various motors and parts. We cover the various ways you can power your Crickit in the next section, since there's a lot of flexibility depending on the budget, portability and complexity of your project.

![circuit_playground_pwr.jpg](https://cdn-learn.adafruit.com/assets/assets/000/053/955/medium640/circuit_playground_pwr.jpg?1526488545)

For now, assume you will plug in a 5V wall adapter to the 2.1mm DC jack. **This DC jack is the only way to provide power to Crickit.** There's a USB jack (covered at the bottom of this section) but you _cannot power the Crickit that way_ (the USB jack is only for debugging seesaw!)

Use 5V DC (4V to 5.5VDC range works) with positive-center voltage. If you try to plug in a negative-center power supply, the polarity-protection will kick in and you will not see any lights on the Crickit.

The Crickit uses a power management chip to keep you from accidentally powering it from 9V or 12V, damaging your electronics. Look for the **OK** and **/!\ warning** LEDs. If you see the green OK LED, the power is fine! If you see the red warning LED, the voltage is too low, too high, or too much current is being used.

You can turn off the Crickit at any time with the **On/Off** switch. This will turn off the 5V power, completely disabling all motors, as well as turning off the seesaw control chip.

There's also a **Reset** button. This button will reset the seesaw chip, and can be used to load new seesaw firmware (you won't likely have to do that). On the Feather Crickit, this button _also_ connects to the Feather reset pin. On the Circuit Playground Crickit, it _does not_ connect to the Playground Reset button.

On the Feather Crickit only, if you double-click the Feather reset button to load new firmware, such as a new version of CircuitPython, the Crickit will also go into double-click firmware-update mode. After you load the new firmware on the Feather, wait for the firmware to start up, and then click the reset button again, once, to get the Crickit back into regular operation mode.

Power options to consider:

- [3 x AA Battery Holder](https://www.adafruit.com/product/3287 "3 x AA Battery Holder") with On/Off Switch (needs JST to 5.5/2.1 adapters)
- [Wall power supply](https://www.adafruit.com/product/276 "Wall power supply") - 5V, 2A, US
- And more options in the [https://www.adafruit.com/categories](https://www.adafruit.com/categories "https://www.adafruit.com/categories")!

# 4 x Hobby Servos
Hobby servos are _really_ popular in robotics because they're fairly low cost, very easy to use, and reliable.&nbsp;

![circuit_playground_servo.jpg](https://cdn-learn.adafruit.com/assets/assets/000/053/954/medium640/circuit_playground_servo.jpg?1526488518)

The Crickit gives you 4 slots for 4 independent servos. You can use micro, mini, standard, large size servos. Analog and digital work great. Continuous or 180-degree are OK. As long as you've got a servo with a 3-pin connector, you're golden.

![circuit_playground_servos_bb.png](https://cdn-learn.adafruit.com/assets/assets/000/054/070/medium640/circuit_playground_servos_bb.png?1526666718)

Servo notes:

- The white/yellow 'signal' wire goes next to the # marking on each port.
- Each servo is controlled by a 16-bit hardware timer at 50 Hz so you will not see any jitter. The signal line is 3.3V logic
- The power to each servo comes from the DC power supply, 5VDC nominal.
- The Crickit can set the pulse width to any value, but in general you'll want to stick to 500ms to 2500ms wide pulses. This is customized in the Arduino, CircuitPython or MakeCode software.
- There is variation from servo to servo, so getting the exact same speed or angle may require some calibration and tweaking. Again, this can be customized in the driver code, the Crickit just generates whatever pulses you like!

The seesaw chip on the Crickit does all the management of these pins so your Feather or CPX does not directly control them, it must send a message to Crickit. They are on seesaw pins **17, 16, 15, 14** in that order.

Typical Adafruit Hobby Servos to consider:

- [Sub-micro Servo](https://www.adafruit.com/product/2201 "Sub-micro Servo")
- [Micro Servo](https://www.adafruit.com/product/169 "Micro Servo")
- [Micro Servo - High Powered, High Torque Metal Gear](https://www.adafruit.com/product/2307)
- [Standard Servo - TowerPro SG-5010](https://www.adafruit.com/product/155 "Standard Servo")
- [Standard Servo - High Torque Metal Gears](https://www.adafruit.com/product/1142 "Standard Servo - High Torque Metal Gears")
- And more in the [Adafruit Shop](https://www.adafruit.com/categories "Adafruit Shop") including Servo Accessories

# 2 x DC Motors
Round & round, DC motors are great whenever you need something to spin. They tend to be faster, stronger and less expensive than continuous-rotation servos, but you need a proper DC motor driver to use them. Luckily, the Crickit can drive two DC motors.

![circuit_playground_motor.jpg](https://cdn-learn.adafruit.com/assets/assets/000/053/956/medium640/circuit_playground_motor.jpg?1526488615)

You get 2 independently-controllable brushed DC motor drives. Each motor can go forwards or backwards, with 8-bit speed control. There's a 5-pin terminal block to connect motors, 2 pins for each motor and a middle ground pin. (The ground pin is for some advanced techniques)

![circuit_playground_dcmotors_bb.png](https://cdn-learn.adafruit.com/assets/assets/000/054/065/medium640/circuit_playground_dcmotors_bb.png?1526665842)

The power to the motors comes from the DC jack, about 5VDC so you can control 3V-6VDC motors, which are very common. The motors can be bare motors or with a gear-box attached

You won't be able to control 1.5V DC motors, they'll burn out. You _might_ be able to control 6-9VDC motors, but they'll be a little slow. Same with 12VDC motors. Likewise, you cannot use the Crickit with brush-less (ESC) motors. Those require a more advanced motor driver!

- Each motor has two wires, you can connect the wires either way. If the spin of the motor is opposite what you want, swap the wires.
- Each motor drive has a 1 Amp peak output. After that, the over-current protection will kick in
- We _don't_ recommend paralleling the output to get twice the current because the seesaw chip cannot guarantee that both will turn on/off at the same time
- Instead of 2 DC motors, you could also control a single bi-polar stepper motor (5VDC power) or single uni-polar stepper motor. You'll use the ground pin for the 5th (and 6th, if it exists) wire of the uni-polar stepper.
- Uses the [DRV8833 dual H-Bridge motor driver chip](http://www.ti.com/product/DRV8833)

The seesaw chip on the Crickit does all the management of these pins so your Feather or CPX does not directly control them, it must send a message to Crickit. They are on seesaw pins **22 + 23** (motor 1) and **19 + 18** (motor 2)

Typical Adafruit Motors to consider:

- [DC Toy Hobby Motor](https://www.adafruit.com/product/711 "DC Toy Hobby Motor")
- [DC Motor in Servo Body](https://www.adafruit.com/product/2941 "DC Motor in Servo Body")
- [DC Gearbox Motor](https://www.adafruit.com/product/3777 "DC Gearbox Motor") - "TT Motor"
- [TT Motor All-Metal Gearbox](https://www.adafruit.com/product/3802 "TT Motor All-Metal Gearbox")
- [TT Motor Bi-Metal Gearbox](https://www.adafruit.com/product/3801)
- And more including accessories in the [Adafruit Shop](https://www.adafruit.com/categories "Adafruit Shop")!

# 4 x High Power Drivers
In addition to servos and DC motors, you may find you want to drive other high-power electronics like relays, solenoids, powerful LEDs, vibration motors, etc. Some of these devices are motor-like and need a kick-back protection diode, so having a proper driver is important to avoid damage!

&nbsp;

This is where you will want to use the high power Drive terminal block. You get four high current drivers. Each driver is a 'Darlington' transistor that, when turned on, connects the output pin to ground.

![circuit_playground_drive.jpg](https://cdn-learn.adafruit.com/assets/assets/000/053/958/medium640/circuit_playground_drive.jpg?1526488789)

That's a little different than most other outputs on the Crickit: **The Crickit can only connect/disconnect the drive pins to Ground!** You cannot 'set' the Drive output to be a high voltage. So, if you're driving a solenoid, relay, vibration motor, etc. connect one side to the **5V** pin, and the other side to one of the driver pins. You can connect multiple wires to the 5V pin if necessary.

![circuit_playground_drives_bb.png](https://cdn-learn.adafruit.com/assets/assets/000/054/066/medium640/circuit_playground_drives_bb.png?1526665901)

Drive details:

- 500mA current limit per output, you can double/triple/quadruple pins up to get more current, if you like. Just make sure to tell the Crickit to turn on/off all four pins in a row.
- Kick-back protection diodes for each output to 5V power.
- [Uses a ULN2003 Darlington driver](http://www.ti.com/product/ULN2003A)
- Instead of 4 solenoids/relays you can connect & control a single uni-polar stepper motor, connect the 5th (and 6th if it exists) wire to 5V. Won't work with bi-polar steppers, use the DC motor ports for that.
- The drive outputs are also PWM-able, so you can control LED brightness or motor power. If using with solenoids or relays, set the duty cycle to 0% or 100% only.
- **Advanced usage:** If you want to drive higher-voltage _non-inductive/motor_ devices, like 12V LEDs, you can power the positive line of the LEDs from 12V, then connect the negative line of the LEDs to drive pins. Make sure your 12V power supply ground is connected to the Crickit ground. Not recommended unless you feel confident you won't accidentally put 12VDC into the Crickit! Kick-back diode wont work in this case so not for use with motors/coils/solenoids...

The seesaw chip on the Crickit does all the management of these pins so your Feather or CPX does not directly control them, it must send a message to Crickit. They are on seesaw pins **13, 12, 43, 42** in that order.

# 8 x Signal I/O
Sure you can drive servos and motors but sometimes you just want to blink an LED or read a button. The Crickit has an eight-signal port. You can use these as "general purpose" input/output pins. We solder a 3x8 female socket header in so you can plug wires in very easily. Each signal has matching 3V and Ground power pins.

![circuit_playground_signal.jpg](https://cdn-learn.adafruit.com/assets/assets/000/053/960/medium640/circuit_playground_signal.jpg?1526488847)

- All pins are 3.3V logic level
- All pins can read analog inputs (potentiometers, bend sensors, etc) at 12-bit resolution
- All pins can be set to outputs with high (3.3V) or low (0V) voltage
- All pins can drive about 7mA when set to outputs
- All pins can have an internal ~50Kohm pull-up resistor set when used as an input
- **Bonus** : If you absolutely need more _capacitive touch_ pins, Signal **#1** , **#2** , **#3** , **#4** are four more capacitive touch inputs.

Signal pin #1 is special and can be set to be a true analog 'output' with 10-bit precision.

The seesaw chip on the Crickit does all the management of these pins so your Feather or CPX does not directly control them, it must send a message to Crickit. They are on seesaw pins **2, 3, 40, 41, 11, 10, 9, 8** in that order

Warning: 

# 4 x Capacitive Touch
Capacitive touch sensing allows you to add human-triggered control to your robot. When you touch the pad (either directly or through an alligator clip, copper tape or conductive ink) the Crickit can detect that signal. We give you four capacitive touch inputs with alligator/croc clip compatible PCB pads.

![circuit_playground_cap.jpg](https://cdn-learn.adafruit.com/assets/assets/000/053/961/medium640/circuit_playground_cap.jpg?1526488919)

- Capacitive touch works best with highly-conductive materials like metal
- But you can have the metal also connect to salty-wet items such as fruit or water. However, do not try to dunk the Crickit into water or squish a grape into the pads - use an alligator clip!
- **Bonus** : if you absolutely need more signal I/O pins, all four capacitive touch pads can also act as analog/digital signal I/O pins!

The seesaw chip on the Crickit does all the management of these pins so your Feather, micro:bit or CPX does not directly control them, it must send a message to Crickit. They are on seesaw pins **4, 5, 6, 7** in order.

# NeoPixel Drive
Blinky lights will make your robot fun and fashionable. And we've made it really easy to add NeoPixels (WS2812/WS2811/SK6812 chipsets) to your project. The Crickit has a 3-terminal block connector with **Ground** , **Signal** and **5V** power. The signal line has a level shifter on it so it will be 5V logic level, for nice clean signals.

![circuit_playground_neopix.jpg](https://cdn-learn.adafruit.com/assets/assets/000/053/962/medium640/circuit_playground_neopix.jpg?1526489019)

This output is slightly different depending on what kind of Crickit you have

- If you have a **Feather Crickit** then the NeoPixels are driven by the seesaw chip on the Crickit, and you must send seesaw commands to set colors. But that means no extra pins are needed from your Feather.
- If you have a **Circuit Playground Crickit** then the NeoPixels are driven by the Circuit Playground&nbsp; **A1** pad by default. This way you can use the MakeCode emulator and built in Circuit Playground CircuitPython library. However, if you want, you can cut the jumper underneath the Crickit and solder closed the&nbsp; **ss** pad so that the seesaw chip controls the NeoPixels (for advanced hackers only).
- If you have a **micro:bit Crickit** , NeoPixels are driven by Pin 16. You can use the NeoPixel Extension in MakeCode, specify Pin 16 as the pin the NeoPixels are connected to and you're set.&nbsp;However, if you want, you can cut the jumper underneath the Crickit and solder closed the&nbsp; **ss** pad so that the seesaw chip controls the NeoPixels (for advanced hackers only).

If you choose to have the NeoPixel driven from the seesaw, note it is on seesaw pin # **20**

Adafruit sells a very wide variety of NeoPixel products - [shop here in the Adafruit Store](https://www.adafruit.com/category/168 "Adafruit Store")!

# Speaker Drive
Audio animatronics? Yes! Your Crickit can make fairly loud sounds thanks to the built in Class-D speaker driver. This will let you amplify audio. **However** please note that the Crickit does not in-itself make audio. The audio must come from the controlling board, such as the Feather or Circuit Playground.

![circuit_playground_spkr.jpg](https://cdn-learn.adafruit.com/assets/assets/000/053/963/medium640/circuit_playground_spkr.jpg?1526489086)

At this time, **we recommend using the speaker with CircuitPython.** &nbsp;MakeCode and Arduino can make tones but don't have easy to use features such as WAV file support.

- Class D audio amplifier
- Can drive 4Ω to 8Ω speaker. Up to 3W with 4Ω and up to 1W with 8Ω
- There's a small potentiometer you can use to adjust the audio volume. By default we set it to the halfway point. Please be gentle if adjusting, don't try to crank it past the two stop-points.
- Ouput is 5VDC BTL (bridge-tied-load) so **do not connect to a stereo system or other line-input!**
- On the Circuit Playground Crickit the speaker is connected directly to the **A0 pad** (the analog output). 
- On the Feather Crickit the speaker input is marked **Audio** on the PCB and you can solder a jumper to the Feather A0 pin if desired.
- On the micro:bit Crickit, the speaker is connected to **Pin 0** , the standard micro:bit audio output pin.

Speakers to consider:

- [Thin Plastic Speaker](https://www.adafruit.com/product/1891 "Thin Plastic Speaker") w/Wires - 8 ohm
- [Speaker](https://www.adafruit.com/product/1313 "Speaker") - 3" Diameter - 8 Ohm 1 Watt
- [Mini Metal Speaker](https://www.adafruit.com/product/1890 "Mini Metal Speaker") w/ Wires - 8 ohm 0.5W
- [Mono Enclosed Speaker - 3W 4 Ohm](https://www.adafruit.com/product/3351)
- [Breadboard-Friendly PCB Mount Mini Speaker](https://www.adafruit.com/product/1898 "PCB Mount Mini Speaker") - 8 Ohm 0.2W
- And more in the [Adafruit shop](https://www.adafruit.com/categories "Adafruit shop")!

# Connecting Your Microcontroller to your Crickit Board
If you have a Circuit Playground Crickit, you can attach the Playground in the middle using 6 standoff bolts that come with the kit. Make sure you tighten these as loose bolts can cause connection issues.

There's six connections to make

- **Ground** - signal and power ground between Crickit and Playground
- **SDA** and **SCL** - the I2C data connection used to send/receive data from the Crickit
- **A1** - Used for the NeoPixel output default
- **A0** - Used for the speaker output
- **VOUT** - This bolt lets you safely power the Circuit Playground _from the Crickit_ so you don't need to separately power the Playground with batteries

![circuit_playground_bolts.jpg](https://cdn-learn.adafruit.com/assets/assets/000/053/964/medium640/circuit_playground_bolts.jpg?1526489203)

If you have a Feather, you can plug it right into the center of the Crickit.

Despite all the sockets, you only will be using 4 connections total:

- **Ground** - signal and power ground between Crickit and Feather
- **SDA** and **SCL** - the I2C data connection used to send/receive data from the Crickit
- **3.3V** - This connection lets you power the Feather _from the Crickit_ so you don't need to separately power the Feather with batteries or USB. Note it will only power the 3.3V line, not **VUSB** or **VBAT**

There's an optional **AUDIO** jumper if you want to connect the **A0** Feather line to the Speaker.

![circuit_playground_feather-center.png](https://cdn-learn.adafruit.com/assets/assets/000/060/959/medium640/circuit_playground_feather-center.png?1536163759)

The micro:bit Crickit is the easiest of them all! Just plug in your micro:bit with the LED grid facing towards the pin numbers as shown on the Crickit silkscreen.

&nbsp;

You'll also see that Pin 0 is marked for speaker use and Pin 16 for NeoPixels (sun icon).

![circuit_playground_center.png](https://cdn-learn.adafruit.com/assets/assets/000/060/958/medium640/circuit_playground_center.png?1536163529)

The Crickit HAT for Raspberry Pi uses the standard Pi 40 pin header (at top in the picture at left) to plug onto the Pi expansion header.&nbsp;

&nbsp;

The holes in the Crickit HAT align with the holes in the Pi so you can use standoff posts for a secure fit.

&nbsp;

All of the functional blocks on the octagonal Crickit boards are on the Crickit HAT, they are just moved to fit the rectangular HAT shape.

![circuit_playground_Crickit_HAT_bb.png](https://cdn-learn.adafruit.com/assets/assets/000/062/076/medium640/circuit_playground_Crickit_HAT_bb.png?1537371191)

# seesaw USB Debug and Indicators
The seesaw chipset is the programmed ATSAMD21 processor in the south section of the board. It comes with its own parts too

![circuit_playground_seesaw.jpg](https://cdn-learn.adafruit.com/assets/assets/000/053/965/medium640/circuit_playground_seesaw.jpg?1526489277)

Across from the power input is the seesaw debug USB connection. This USB power **cannot power the** Crickit and it also does not connect to the Feather or Circuit Playground USB.

It's _only_ for debugging/reloading seesaw firmware. Basically, if we add more Crickit capabilities, you could load new firmware over this USB connection. In general, you won't be using this port, you may want to cover it with some masking tape!

To the right is a yellow **Activity** LED, which will flash when seesaw sends/receives commands from your Circuit Playground or Feather. To the left is a seesaw NeoPixel. You can control this NeoPixel if you like, to give you status information, as an advanced usage

The internal NeoPixel is on seesaw pin # **27**

# Introducing Adafruit Crickit #MakeRobotFriend

## Update Your Crickit

Your Crickit contains a special interface chip we call _seesaw_. Like a see-saw you see in a playground, it goes up/down back/forth. In this case, instead of holding children, it sends commands and responses back and forth - motor movement, sensors inputs, signal i/o...

The seesaw code is contained in a microcontroller near the bottom of the Crickit, and that chip comes with the seesaw firmware on it already when&nbsp; you get it!

**But** we do make improvements to the seesaw firmware, fix bugs, and improve performance

So its a good idea to update your Crickit when you get it! It's easy and only takes a few seconds.

Warning: 

## Step 1. Plug in USB cable into seesaw/Crickit

There's a little USB connector at the bottom of your Crickit labeled **seesaw only!** Plug a standard data-sync USB cable into that port and into your computer. You do not need to plug in the DC power jack or power the Feather/CircuitPlayground.

Do check that the switch on the Crickit is switched to **ON**

# Step 2. Double-click the Crickit Reset button
On the Crickit for CPX, Feather or Micro:bit, this button is next to the DC jack and is pretty large.

&nbsp;

On the Raspberry Pi, its more compact, and is right below the status NeoPixel

![circuit_playground_reset.jpg](https://cdn-learn.adafruit.com/assets/assets/000/057/189/medium640/circuit_playground_reset.jpg?1530832839)

![circuit_playground_seesawreset.jpg](https://cdn-learn.adafruit.com/assets/assets/000/067/690/medium640/circuit_playground_seesawreset.jpg?1544825407)

# Step 3. Look for pulsing yellow LED and green NeoPixel
If you have a good USB connection and you double-click right, you'll see the left LED turn green and the right hand little yellow LED start pulsing

![circuit_playground_closeup-seesaw-botloader.gif](https://cdn-learn.adafruit.com/assets/assets/000/057/190/medium640thumb/circuit_playground_closeup-seesaw-botloader.jpg?1530832884)

# Step 4. Look for a New Disk on Your Computer
You'll see a new disk drive on your computer called **CRICKITBOOT** (short for crickit bootloader)

![circuit_playground_crickboot.png](https://cdn-learn.adafruit.com/assets/assets/000/057/191/medium640/circuit_playground_crickboot.png?1530833011)

# Step 5. Download the latest firmware

Click here to go to the download page for the latest Crickit firmware releases.

[Latest Crickit seesaw Firmware](https://github.com/adafruit/seesaw/releases/latest)
Download the correct file for your specific hardware:

- Crickit HAT (Raspberry Pi) = seesaw-crickitHat.uf2
- All others = seesaw-crickit.uf2

# Step 6. Drag UF2 file onto CRICKITBOOT
Drag that file you downloaded onto the disk drive, after it is completed the drive will disappear (you may get a complaint from the operating system)

&nbsp;

&nbsp;

**That's it!** You're now updated

![circuit_playground_drag.png](https://cdn-learn.adafruit.com/assets/assets/000/057/192/medium640/circuit_playground_drag.png?1530840561)

# Introducing Adafruit Crickit #MakeRobotFriend

## Powering Crickit

![](https://cdn-learn.adafruit.com/assets/assets/000/053/966/medium800/circuit_playground_onlypwr.jpg?1526489363)

On the Crickit HAT, the 5V power plug is next to the 2x20 connector

![circuit_playground_hat5V.jpg](https://cdn-learn.adafruit.com/assets/assets/000/067/687/medium640/circuit_playground_hat5V.jpg?1544825223)

 **The first thing you'll learn when making robots is that they use a lot of power.** So making sure you have your power supply all worked out is super important. We've tried to make the power supply as easy and safe as possible, so you don't have to worry about damaging your electronics or robot. To do that we made some important design decisions.

# How to Power your Crickit

**It's really important to read and understand how to power your Crickit!**

- You **MUST** provide about 4-5 Volts DC power to the Crickit to power the servos, motors, solenoids, NeoPixels, etc.
- You **CANNOT** provide this power by plugging the Crickit, micro:bit, Feather, Raspberry Pi or&nbsp; Circuit Playground into USB. Computer USB ports cannot provide the 2 Amp + required to drive robotics, LEDs, speakers...
- Power to the Crickit is provided via the **2.1mm DC Jack only!**
- The Cricket has two LEDs to let you know how the power supply is doing. If you see the green LED next to the smiley face, you're good to go. If you see the red LED next to the warning triangle, the voltage is too high, too low or too much current is being drawn.
- The Crickit power will _also_ power the Circuit Playground Express, micro:bit, Raspberry Pi or Feather so you don't need separate power for your microcontroller board (however, if you want to plug it into USB for programming, that's totally OK too!)

Here's our recommended ways to power the Crickit:

# Plug In DC Power Supplies

These get wall power and give you a nice clean 5V DC power option. 5V 2A works for most project with a motor or two...

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

And a 5V 4A supply will give you _lots_ of power so you can drive 4 or more servos, motors, etc. Use this if you notice you're running out of power with a 5V 2A adapter

### 5V 4A (4000mA) switching power supply - UL Listed

[5V 4A (4000mA) switching power supply - UL Listed](https://www.adafruit.com/product/1466)
Need a lot of 5V power? This switching supply gives a clean regulated 5V output at up to **4 Amps** (4000mA). 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 up at any hardware store for $1 or so,...

In Stock
[Buy Now](https://www.adafruit.com/product/1466)
[Related Guides to the Product](https://learn.adafruit.com/products/1466/guides)
![Angled shot of 5V 4A switching power supply brick with power cable.](https://cdn-shop.adafruit.com/640x480/1466-10.jpg)

# AA Battery Packs

On the go? Portable power is possible! Use AA battery packs.

The number of batteries you need depends on whether you are using Alkaline or NiMH rechargeables.

**We recommend NiMH rechargeables.** For one, they have less waste, but they also perform better than alkalines in high-current draw robotics. So if you can, please use NiMH!

## 4 x AA Battery Packs for NiMH ONLY

NiMH batteries have a 1.3V max voltage, so 4 of them is 4 x 1.3 = 5.2 Volts. Perfect!

### 4 x AA Battery Holder with On/Off Switch

[4 x AA Battery Holder with On/Off Switch](https://www.adafruit.com/product/830)
Make a nice portable power pack with this 4 x AA battery holder. It fits any alkaline or rechargeable AA batteries in series. There's a snap on cover and an on/off switch which can be handy when wiring to something without a switch.

**New**! We now have 0.1" headers...

In Stock
[Buy Now](https://www.adafruit.com/product/830)
[Related Guides to the Product](https://learn.adafruit.com/products/830/guides)
![Angled shot of square black 4 x AA battery holder with on/off switch and male jumper wires.](https://cdn-shop.adafruit.com/640x480/830-07.jpg)

## 3 x AA Battery Packs for Alkaline ONLY

Alkaline batteries have a 1.5V max voltage, so 4 of them is 4 x 1.5 = 6 Volts. That's too high! Instead we recommend 3 in series for 3 x 1.5V = 4.5 VDC

### 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)
![Angled shot of 3 x AA battery holder with 2.1mm plug. There are three AA batteries in the holder.](https://cdn-shop.adafruit.com/640x480/3842-01.jpg)

If you're making a custom battery pack you may want to pick up a 2.1mm DC jack adapter, so you can connect battery pack wires

### Waterproof 3xAA Battery Holder with On/Off Switch

[Waterproof 3xAA Battery Holder with On/Off Switch](https://www.adafruit.com/product/771)
Keep your power source safe and toasty in these waterproof 3xAA battery holders. They're just like classic switched battery holders, but designed for survival! The case has a rubber gasket around the edge of the case (its black and hard to see in the photos but it is there) and attaches...

In Stock
[Buy Now](https://www.adafruit.com/product/771)
[Related Guides to the Product](https://learn.adafruit.com/products/771/guides)
![Angled shot of black 3 x AA waterproof battery holder with plain wires.](https://cdn-shop.adafruit.com/640x480/771-04.jpg)

### Male DC Power adapter - 2.1mm plug to screw terminal block

[Male DC Power adapter - 2.1mm plug to screw terminal block](https://www.adafruit.com/product/369)
If you need to connect a battery pack or wired power supply to a board that has a DC jack - this adapter will come in very handy! There is a 2.1mm DC plug on one end, and a screw terminal block on the other. The terminals are labeled with positive/negative assuming a positive-tip configuration...

In Stock
[Buy Now](https://www.adafruit.com/product/369)
[Related Guides to the Product](https://learn.adafruit.com/products/369/guides)
![Angled shot of a Male DC Power adapter - 2.1mm plug ](https://cdn-shop.adafruit.com/640x480/369-03.jpg)

# Not Recommended Power supplies

- **LiPoly Batteries** - 1 battery is 3.7V, too low. 2 batteries is 7.2V, too high! You could possibly use a 7.2V pack and then [a UBEC to step down to 5V](https://www.adafruit.com/product/1385) but its not recommended
- **Lead Acid Batteries** - These are heavy and you'll need a custom charging solution. You can probably get away with a 2 x 2V cell pack, or a 3 x 2V cell pack and then add some 1N4001 diodes to drop the voltage, but it's for advanced hacking!
- **USB Power Packs** - In theory you can use a [USB to 2.1mm DC power adapter](https://www.adafruit.com/product/2697), but power packs sometimes dislike the kinds of current draw that motors have (high current peaks for short amounts of time) So experimentation is key!

# Introducing Adafruit Crickit #MakeRobotFriend

## Assembly

Only the Circuit Playground Express + Crickit combination needs assembly, the Feather and micro:bit Crickits have sockets which the microcontroller plugs into.

The Crickit HAT for Raspberry Pi does not need assembly either, it has female receptors for a male Raspberry Pi header.

The Circuit Playground Express version of Crickit comes with a package of six threaded, hexagonal brass standoffs. These will hold the Circuit Playground Express above and onto the Crickit.

![circuit_playground_3816-02.jpg](https://cdn-learn.adafruit.com/assets/assets/000/057/174/medium640/circuit_playground_3816-02.jpg?1530824627)

Using a Philips screwdriver and the provided screws, attach the standoffs to the six large holes on the inside ring of Crickit. There are three holes near the Adafruit logo and three more near the Neopixel and speaker outputs. You do not want to put the standoffs on the holes on the outside edge of Crickit - there are 8 mounting holes there but these standoffs are needed for the Circuit Playground Express.

![circuit_playground_bolts.jpg](https://cdn-learn.adafruit.com/assets/assets/000/053/967/medium640/circuit_playground_bolts.jpg?1526489439)

Tighten the screws firm but do not try to tighten excessively. A good mechanical and electrical connection is needed but excessive torque could crack a circuit board or at least make things hard to take apart later.

Once you have the six standoffs screwed into Crickit, place a Circuit Playground Express board (ID 3333, **not** the Circuit Playground Classic board ID 3000) onto the standoffs with the silver USB-B port of the Express pointing in the same direction as the Crickit black power jack. This will align the standoffs to the following pads:

4 o'clock: **A1** , "4:30": **A0** , 5 o'clock: **VOUT**

10 o'clock: **SDA** , "10:30": **SCL** , 11 o'clock: **GND**

![](https://cdn-learn.adafruit.com/assets/assets/000/057/187/medium800thumb/circuit_playground_ezgif-5-ebe0714886.jpg?1530831067)

Warning: 

Once you have the Circuit Playground Express lined up correctly, use the remaining screws to attach the boards together. Start with one screw into one standoff, say GND, leave it loose a bit, then put in the VOUT screw, loose, then the others loosely. Ensure things are lined up, then carefully tighten each screw. Again, a firm connection but not overly tight.

![circuit_playground_3093_top_CP_ORIG_2018_05.jpg](https://cdn-learn.adafruit.com/assets/assets/000/053/970/medium640/circuit_playground_3093_top_CP_ORIG_2018_05.jpg?1526491577)

Now the two boards should be attached to one another.

![circuit_playground_3093_iso_CP_ORIG_2018_05.jpg](https://cdn-learn.adafruit.com/assets/assets/000/054/006/medium640/circuit_playground_3093_iso_CP_ORIG_2018_05.jpg?1526506892)

There are circular markings on the bottom of Crickit for four mounting pads ([Adafruit ID 550](https://www.adafruit.com/product/550 "Rubber feet")) if you would like to use the board on a surface and protect the surface and bottom of your Crickit.

![circuit_playground_3093_quarter_01_ORIG_2018_05.jpg](https://cdn-learn.adafruit.com/assets/assets/000/054/007/medium640/circuit_playground_3093_quarter_01_ORIG_2018_05.jpg?1526506945)

If you happen to lose a standoff or screw(s), a new package is available from Adafruit:

### Circuit Playground Bolt-On Kit

[Circuit Playground Bolt-On Kit](https://www.adafruit.com/product/3816)
You have a [Circuit Playground Express](https://www.adafruit.com/product/3333), but you need to mount it to your&nbsp;charming cardboard robot friend, eh? Not so easy if you don't have a set of standoffs!&nbsp;  
  
In this kit comes:

- 6 x M3 12mm brass hexagonal...

In Stock
[Buy Now](https://www.adafruit.com/product/3816)
[Related Guides to the Product](https://learn.adafruit.com/products/3816/guides)
![Angled shot of 6 stand offs from a Circuit Playground Bolt-On Kit.](https://cdn-shop.adafruit.com/640x480/3816-04.jpg)

### Little Rubber Bumper Feet - Pack of 4

[Little Rubber Bumper Feet - Pack of 4](https://www.adafruit.com/product/550)
Keep your electronics from going barefoot, give them little rubber feet! These small sticky bumpers are our favorite accessory for any electronic kit or device. They are sticky, but not impossible to remove. They're small enough to fit onto any board, and have just enough height to give...

In Stock
[Buy Now](https://www.adafruit.com/product/550)
[Related Guides to the Product](https://learn.adafruit.com/products/550/guides)
![Angled Shot of the Little Rubber Bumper Feet - Pack of 4](https://cdn-shop.adafruit.com/640x480/550-06.jpg)

# Introducing Adafruit Crickit #MakeRobotFriend

## Troubleshooting Crickit

Your Crickit is well tested but there's things that can trip you up! Here's a few common issues we see

## My Crickit Is Doing Something Wrong

We do have bugs once in a while, [so please always try updating to the latest Crickit seesaw firmware](https://learn.adafruit.com/adafruit-crickit-creative-robotic-interactive-construction-kit/update-your-crickit) - then see if the bug persists

## My Crickit Motors Aren't Moving!

## My Crickit Keeps Resetting, It Works For a Bit... Then Fails!

Check the power supply. There's a few ways to know that power is good:

1. Check the "Happy Face" green LED below the power switch, it should stay lit!
2. Check the "Warning Symbol" red LED below the power switch, it should be _off_

If you have updated the Crickit seesaw firmware (see above) we have added NeoPixel feedback, the LED will be green when power is good and blink red when power is bad!

![circuit_playground_power-fail-anim.gif](https://cdn-learn.adafruit.com/assets/assets/000/057/212/medium640thumb/circuit_playground_power-fail-anim.jpg?1530894752)

## HELP! My Crickit isn't working in MakeCode, and in Python I see a message "No I2C Device at Address: 49"

A **super common** issue we see is people using the Crickit with Circuit Playground Express (CPX) and **the bolts/screws have come loose!** Those bolts aren't just mechanical, they pass signals back and forth between the CPX and the Crickit!

If you're having issue, **first thing to check is that those screws are tightly attached!**

![](https://cdn-learn.adafruit.com/assets/assets/000/057/188/medium800thumb/circuit_playground_ezgif-5-ebe0714886.jpg?1530831083)

Another common issue we see is not having good power to the Crickit. Check that you have fresh batteries or a good 5V power supply. Also check the Crickit is on! There's an on/off switch next to the power jack

## Python: No Pullups found on SDL and SCL

This most often indicated the Crickit is not powered.

If you're running Crickit on battery power, you need fresh batteries.

If you use the wall power brick to provide power, ensure it is plugged in and the power switch is on.

If batteries aren't an issue, try clicking reset on the Crickit board to kick it back into running

## micro:bit Crickit does not work

Be sure the micro:bit LED matrix faces towards the Crickit Seesaw chip and USB firmware update plug and the micro:bit reset button faces the Crickit black power jack. If you plug the micro:bit in backwards, it won't control things properly. Unplug the micro:bit, make sure the 5x5 grid of LEDs faces the Crickit printing that says "micro:bit LED grid faces this way" and you should be set.

# Introducing Adafruit Crickit #MakeRobotFriend

## Recommended Motors

# DC Gearbox Motors

These DC motors have a gear box already built in, and wires attached, so they're super easy to use:

### 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)
![DC Gearbox Motor - TT Motor with two long wires and yellow body](https://cdn-shop.adafruit.com/640x480/3777-00.jpg)

We also have a wide range of matching wheels:

### Orange and Clear TT Motor Wheel for TT DC Gearbox Motor

[Orange and Clear TT Motor Wheel for TT DC Gearbox Motor](https://www.adafruit.com/product/3766)
Usually when one needs an orange wheel&nbsp;it's a garnish for a cocktail, like a tasty Sidecar. And speaking of cars,&nbsp;this wheel **&nbsp;** is for driving, not drinking!

Need a great drive solution for&nbsp;your little robotic friends?&nbsp;This&nbsp; **Orange...**

In Stock
[Buy Now](https://www.adafruit.com/product/3766)
[Related Guides to the Product](https://learn.adafruit.com/products/3766/guides)
![Orange and Clear TT Motor Wheel for DC Gearbox Motor](https://cdn-shop.adafruit.com/640x480/3766-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...

In 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)

### Skinny Wheel for TT DC Gearbox Motors

[Skinny Wheel for TT DC Gearbox Motors](https://www.adafruit.com/product/3757)
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 _wheels_ to go along with them.

This **TT DC Motor Wheel** is solid, but thin, so it...

In Stock
[Buy Now](https://www.adafruit.com/product/3757)
[Related Guides to the Product](https://learn.adafruit.com/products/3757/guides)
![Angled shot of a black, skinny plastic wheel.](https://cdn-shop.adafruit.com/640x480/3757-00.jpg)

**Other accessories are available, [check the Adafruit shop for "TT Motor" items](https://www.adafruit.com/?q=tt%20motor) for the wide range of add-ons available.**

# Servo-style DC motor

If you need a motor that is very compact (but not very powerful) these DC-in-servo-body motors can do the job:

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

Which can be used with this wheel:

### Wheel for Micro Continuous Rotation FS90R Servo

[Wheel for Micro Continuous Rotation FS90R Servo](https://www.adafruit.com/product/2744)
We're keepin' it&nbsp;_wheel_ with this one!

Need a great drive solution for&nbsp;your little robotic friends?&nbsp;This black plastic&nbsp; **Micro Continuos Rotation Servo Wheel** &nbsp;is&nbsp;equipped with a silicone...

Out of Stock
[Buy Now](https://www.adafruit.com/product/2744)
[Related Guides to the Product](https://learn.adafruit.com/products/2744/guides)
![Angled shot of a small, black, plastic micro servo wheel.](https://cdn-shop.adafruit.com/640x480/2744-00.jpg)

# Non-Geared DC Motor

Non-geared DC motors are very weak but _very fast:_ great for fans:

### DC Toy / Hobby Motor - 130 Size

[DC Toy / Hobby Motor - 130 Size](https://www.adafruit.com/product/711)
These are standard '130 size' DC hobby motors. They come with a wider operating range than most toy motors: from 4.5 to 9VDC instead of 1.5-4.5V. This range makes them perfect for controlling with an Adafruit Motor Shield, or with an Arduino where you are more likely to have 5 or 9V...

In Stock
[Buy Now](https://www.adafruit.com/product/711)
[Related Guides to the Product](https://learn.adafruit.com/products/711/guides)
![DC Toy Hobby Motor ](https://cdn-shop.adafruit.com/640x480/711-06.jpg)

# Introducing Adafruit Crickit #MakeRobotFriend

## Recommended Chassis

This chassis is cute, red and has two DC motors so its super easy to drive from the Crickit's dual DC motor port. You may need to use some wires to extend the DC motor connections (they're a tad short)

### Mini Round Robot Chassis Kit - 2WD with DC Motors

[Mini Round Robot Chassis Kit - 2WD with DC Motors](https://www.adafruit.com/product/3216)
Unleash your inner [Mad Max](https://www.youtube.com/watch?v=9L67BiENzYs) and make your vehicle dreams a reality with the&nbsp; **Mini Red Round Robot Chassis Kit.**

This kit gives you everything you need to build the shell of a 2-wheel-drive Mobile Platform Robot!...

Out of Stock
[Buy Now](https://www.adafruit.com/product/3216)
[Related Guides to the Product](https://learn.adafruit.com/products/3216/guides)
![Round two-wheeled robot turning around a few times and then driving off.](https://cdn-shop.adafruit.com/product-videos/640x480/3216-09.jpg)

This chassis is nearly identical, but has 3 layers, so you can FIT MORE STUFF!

### Mini 3-Layer Round Robot Chassis Kit - 2WD with DC Motors

[Mini 3-Layer Round Robot Chassis Kit - 2WD with DC Motors](https://www.adafruit.com/product/3244)
Does this guy look familiar? Of course it does! It's our **Black, 3-Layer Round Robot Chassis Kit** from [AdaBox002](https://www.adafruit.com/product/3235)!

This kit gives you everything you need to build the shell of a 2-wheel-drive Mobile Platform Robot! You...

Out of Stock
[Buy Now](https://www.adafruit.com/product/3244)
[Related Guides to the Product](https://learn.adafruit.com/products/3244/guides)
![Angled shot of three-layer round robot in black metal with Feather plus motor featherwing connected to motors.](https://cdn-shop.adafruit.com/640x480/3244-02.jpg)

This chassis is not as nice as the above, but if you fancy it, it comes with two servo-style DC motors and can use the DC motor control on the Crickit as well

### Mini Robot Rover Chassis Kit - 2WD with DC Motors

[Mini Robot Rover Chassis Kit - 2WD with DC Motors](https://www.adafruit.com/product/2939)
Unleash your inner [Mad Max](https://www.youtube.com/watch?v=9L67BiENzYs) and make your vehicle dreams a reality with the&nbsp; **Mini Robot Rover Kit.**

This kit gives you everything you need to build the shell of a 2-wheel-drive Robot Rover! You get the chassis,...

Out of Stock
[Buy Now](https://www.adafruit.com/product/2939)
[Related Guides to the Product](https://learn.adafruit.com/products/2939/guides)
![Two-wheeled robot turning around a few times and then driving off.](https://cdn-shop.adafruit.com/product-videos/640x480/2939-08.jpg)

# Introducing Adafruit Crickit #MakeRobotFriend

## Recommended Servos

You're in luck, you can use **just about any kind of servo!**

**Note that many of the photos below don't show the additional motor horns, but every servo comes with plastic clip-on parts!**

![](https://cdn-learn.adafruit.com/assets/assets/000/053/945/medium800/circuit_playground_155-02.jpg?1526428225)

# Servo Extensions

People often ask us what they can do if the wire to their Servo is to short for their project. Not a problem! These cables act as extension cords - now you've got plenty of room.

### Servo Extension Cable - 30cm / 12" long -

[Servo Extension Cable - 30cm / 12" long -](https://www.adafruit.com/product/972)
Stretch out your servo connections with this flexible servo extension cord. It has a 3 pin shrouded "male" connection to plug your servo into and then, 30cm later, a 3 pin female connection. It even keeps the common red/black/white color coding. A great add-on to our <a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/972)
[Related Guides to the Product](https://learn.adafruit.com/products/972/guides)
![Three pin Servo Extension Cable - 30cm / 12" long.](https://cdn-shop.adafruit.com/640x480/972-02.jpg)

### Servo Extension Cable - 50cm / 19.5" long

[Servo Extension Cable - 50cm / 19.5" long](https://www.adafruit.com/product/973)
Stretch out your servo connections with this flexible servo extension cord. It has a 3 pin shrouded "male" connection to plug your servo into and then, 50cm later, a 3 pin female connection. It even keeps the common red/black/white color coding. A great add-on to our <a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/973)
[Related Guides to the Product](https://learn.adafruit.com/products/973/guides)
![Three pin Servo Extension Cable - 50cm / 19.5" long.](https://cdn-shop.adafruit.com/640x480/973-02.jpg)

# Popular plastic-gear servos

The most popular/common servos have plastic gears, they're plenty strong and not too expensive!

These can go back and forth, rotating about 180 degrees

They come in 'standard' size:

### Standard servo - TowerPro SG-5010

[Standard servo - TowerPro SG-5010](https://www.adafruit.com/product/155)
This high-torque standard servo can rotate approximately 180 degrees (90 in each direction). You can use any servo code, hardware, or library to control these servos. Good for beginners who want to make stuff move without building a motor controller with feedback & gearbox. Comes with 3...

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

And 'micro' size, not as strong but much more compact

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

# Continuous Rotation Servos

These servos look a lot like the above but they rotate _all the way around_. Unlike standard servos you can't control the location of the horn, just the speed and direction it which it turns. Good as an alternative to DC motors for wheeled bots. For that reason, they tend to get purchased with matching wheels!

### Continuous Rotation Servo

[Continuous Rotation Servo](https://www.adafruit.com/product/154)
This servo rotates fully forward or backward instead of moving to a position. You can use any servo code, hardware, or library to control these servos. Good for making simple moving robots. Comes with four different horns, as shown.

To control with an Arduino, we suggest connecting...

Out of Stock
[Buy Now](https://www.adafruit.com/product/154)
[Related Guides to the Product](https://learn.adafruit.com/products/154/guides)
![Continuous Rotation Servo with three pin cable](https://cdn-shop.adafruit.com/640x480/154-07.jpg)

### Continuous Rotation Servo Wheel

[Continuous Rotation Servo Wheel](https://www.adafruit.com/product/167)
Plastic wheel with a cutout specially designed to allow attachment to our [larger continuous rotation servo](https://www.adafruit.com/product/154). Makes it easy to get your robot rolling. Each wheel comes with a&nbsp;rubber tire that is quite sturdy. To attach, just remove the horn...

In Stock
[Buy Now](https://www.adafruit.com/product/167)
[Related Guides to the Product](https://learn.adafruit.com/products/167/guides)
![Small, black, plastic wheel](https://cdn-shop.adafruit.com/640x480/167-02.jpg)

### Continuous Rotation Micro Servo

[Continuous Rotation Micro Servo](https://www.adafruit.com/product/2442)
Need to make a _tiny_ robot? This little micro servo rotates 360 degrees fully forward or backward, instead of moving to a single position. You can use any servo code, hardware, or library to control these servos. Good for making simple moving robots. Comes with five horns and...

Out of Stock
[Buy Now](https://www.adafruit.com/product/2442)
[Related Guides to the Product](https://learn.adafruit.com/products/2442/guides)
![Demo Video of the Continuous Rotation Micro Servo with a "t" shaped propeller connected to the gear and spinning.](https://cdn-shop.adafruit.com/product-videos/640x480/2442-02.jpg)

### Wheel for Micro Continuous Rotation FS90R Servo

[Wheel for Micro Continuous Rotation FS90R Servo](https://www.adafruit.com/product/2744)
We're keepin' it&nbsp;_wheel_ with this one!

Need a great drive solution for&nbsp;your little robotic friends?&nbsp;This black plastic&nbsp; **Micro Continuos Rotation Servo Wheel** &nbsp;is&nbsp;equipped with a silicone...

Out of Stock
[Buy Now](https://www.adafruit.com/product/2744)
[Related Guides to the Product](https://learn.adafruit.com/products/2744/guides)
![Angled shot of a small, black, plastic micro servo wheel.](https://cdn-shop.adafruit.com/640x480/2744-00.jpg)

# High Torque Servos

If you need more power, metal-gear servos can give you better torque, but at additional cost (since the gears have to be machined)

These are not continuous rotation

### 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)
![Standard Size - High Torque - Metal Gear Servo  with three pin cable](https://cdn-shop.adafruit.com/640x480/1142-06.jpg)

### Micro Servo - High Powered, High Torque Metal Gear

[Micro Servo - High Powered, High Torque Metal Gear](https://www.adafruit.com/product/2307)
Add even _more_ power to your robot with this metal-geared servo. The 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...

In Stock
[Buy Now](https://www.adafruit.com/product/2307)
[Related Guides to the Product](https://learn.adafruit.com/products/2307/guides)
![High Powered, High Torque Metal Gear Micro Servo ](https://cdn-shop.adafruit.com/640x480/2307-00.jpg)

### Micro Servo - MG90D High Torque Metal Gear

[Micro Servo - MG90D High Torque Metal Gear](https://www.adafruit.com/product/1143)
Add more power to your robot with this metal-geared MG90D&nbsp;servo. The tiny little servo can rotate approximately 90 degrees (45 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...

In Stock
[Buy Now](https://www.adafruit.com/product/1143)
[Related Guides to the Product](https://learn.adafruit.com/products/1143/guides)
![High Torque Metal Gear Micro Servo  with three pin cable](https://cdn-shop.adafruit.com/640x480/1143-08.jpg)

# Introducing Adafruit Crickit #MakeRobotFriend

## Recommended Speakers

The Class-D amplifier on the Crickit is pretty powerful, so you can make quite a bit of noise!

# 4Ω Speakers

You'll get a lot louder audio from 4Ω speakers.

We recommend this speaker, you'll&nbsp; have to either poke wires into the connector, or cut it off and strip the wires to connect to the terminal block, but its nice and durable

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

This speaker is less expensive but you'll need to solder wires to the back

### Speaker - 3" Diameter - 4 Ohm 3 Watt

[Speaker - 3" Diameter - 4 Ohm 3 Watt](https://www.adafruit.com/product/1314)
Listen up! This 3" diameter speaker cone is the perfect addition to any audio project where you need an 4 ohm impedance and 3W or less of power. We particularly like this cone as it has 4 handy mounting tabs 60mm apart.  
  
Works great with our <a...></a...>

Out of Stock
[Buy Now](https://www.adafruit.com/product/1314)
[Related Guides to the Product](https://learn.adafruit.com/products/1314/guides)
![Overhead shot of 3" diameter speaker.](https://cdn-shop.adafruit.com/640x480/1314-00.jpg)

# 8Ω Speakers

8 ohm speakers won't be as loud, but that's OK!

This speaker is inexpensive, but you'll need to solder wires to the back

### Speaker - 3" Diameter - 8 Ohm 1 Watt

[Speaker - 3" Diameter - 8 Ohm 1 Watt](https://www.adafruit.com/product/1313)
Listen up! This 3" diameter speaker cone is the perfect addition to any audio project where you need an 8 ohm impedance and 1W or less of power. We particularly like this cone as it has 4 handy mounting tabs 60mm apart.  
  
Works great with our <a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/1313)
[Related Guides to the Product](https://learn.adafruit.com/products/1313/guides)
![Overhead shot of 3" diameter speaker.](https://cdn-shop.adafruit.com/640x480/1313-00.jpg)

The speakers below work just fine, but because the audio amp is pretty strong so you have to make sure not to damage the speakers by turning up the potentiometer on the Crickit to make the audio really loud.

If you're getting buzzy sounds from them, turn that little trimmer potentiometer down.

### Mini Metal Speaker w/ Wires - 8 ohm 0.5W

[Mini Metal Speaker w/ Wires - 8 ohm 0.5W](https://www.adafruit.com/product/1890)
Listen up! This tiny 1" diameter speaker cone is the perfect addition to any small audio project where you need an 8 Ω impedance and will be using 0.5W or less of power. We particularly like this cone as it's very simple and its metal body is extremely lightweight. <a...></a...>

Out of Stock
[Buy Now](https://www.adafruit.com/product/1890)
[Related Guides to the Product](https://learn.adafruit.com/products/1890/guides)
![Mini Metal Speaker with Wires](https://cdn-shop.adafruit.com/640x480/1890-06.jpg)

### Thin Plastic Speaker w/Wires - 8 ohm 0.25W

[Thin Plastic Speaker w/Wires - 8 ohm 0.25W](https://www.adafruit.com/product/1891)
Listen up! This 1.5" diameter speaker cone is the perfect addition to any audio project where you need an 8Ω impedance and are using 0.25W of power. The speakers are rated at 0.25W, with a maximum input of 0.5W (printed wattage on back of speaker may have either value).

We...

In Stock
[Buy Now](https://www.adafruit.com/product/1891)
[Related Guides to the Product](https://learn.adafruit.com/products/1891/guides)
![Angled Shot of the Thin Plastic Speaker w/Wires - 8 ohm 0.25W](https://cdn-shop.adafruit.com/640x480/1891-05.jpg)

# Wall or Bone Transducers

You can also use surface transducers if you like; attach/bolt/clamp the transducer to a surface:

### Medium Surface Transducer with Wires - 4 Ohm 3 Watt

[Medium Surface Transducer with Wires - 4 Ohm 3 Watt](https://www.adafruit.com/product/1785)
Turn any surface/wall/table etc into a speaker with a surface transducer. This type of speaker does not have a moving cone like most speakers you've seen. Instead, a small metal rod is wrapped with the voice coil. When current is pulsed through the coil, the magnetic field causes a piece...

In Stock
[Buy Now](https://www.adafruit.com/product/1785)
[Related Guides to the Product](https://learn.adafruit.com/products/1785/guides)
![Angle Shot of Medium Surface Transducer](https://cdn-shop.adafruit.com/640x480/1785-06.jpg)

### Bone Conductor Transducer with Wires - 8 Ohm 1 Watt

[Bone Conductor Transducer with Wires - 8 Ohm 1 Watt](https://www.adafruit.com/product/1674)
Drown out the voices in your head with a bone conduction transducer! This incredible speaker does not have a moving cone like most speakers you've seen, instead, a small metal rod is wrapped with the voice coil. When current is pulsed through the coil, the magnetic field causes a piece of...

Out of Stock
[Buy Now](https://www.adafruit.com/product/1674)
[Related Guides to the Product](https://learn.adafruit.com/products/1674/guides)
![Small Bone Conductor Transducer with Wires](https://cdn-shop.adafruit.com/640x480/1674-00.jpg)

# Introducing Adafruit Crickit #MakeRobotFriend

## Recommended Drives

# Solenoids

Since the Crickit can only drive 5V power, you'll need to stick to this small 5V solenoid

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

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

# Vibration Motors

You'll need to extend these wires but they'll work great at 5V and buzz very strongly

### Vibrating Mini Motor Disc

[Vibrating Mini Motor Disc](https://www.adafruit.com/product/1201)
\*BZZZZZZZZZZ\* Feel that? That's your little buzzing motor, and for any haptic feedback project you'll want to pick up a few of them. These vibe motors are tiny discs, completely sealed up so they're easy to use and embed.  
  
Two wires are used to control/power the vibe....

In Stock
[Buy Now](https://www.adafruit.com/product/1201)
[Related Guides to the Product](https://learn.adafruit.com/products/1201/guides)
![Vibrating Mini Motor Disc with two wires](https://cdn-shop.adafruit.com/640x480/1201-01.jpg)

# Introducing Adafruit Crickit #MakeRobotFriend

## Recommended Capacitive Touch

The capacitive touch pads on the Crickit have large holes so its easy to connect alligator/croc clips. That's how we recommend you attach to them. The "small" size clips work best:

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

You can also use copper foil tape. Note that if you get foil with conductive adhesive, you can tape the foil right onto the Crickit pads. Otherwise you'll need to use alligator clips to grab onto the copper.

### Copper Foil Tape with Conductive Adhesive - 6mm x 15 meter roll

[Copper Foil Tape with Conductive Adhesive - 6mm x 15 meter roll](https://www.adafruit.com/product/1128)
Copper tape can be an interesting addition to your toolbox. The tape itself is made of thin pure copper so its extremely flexible and can take on nearly any shape. You can easily solder to it, and the tape itself can carry current just like a wire. On the back is an electrically conductive...

In Stock
[Buy Now](https://www.adafruit.com/product/1128)
[Related Guides to the Product](https://learn.adafruit.com/products/1128/guides)
![Angled Shot of the Copper Foil Tape with Conductive Adhesive - 6mm x 15 meter roll.](https://cdn-shop.adafruit.com/640x480/1128-04.jpg)

### Copper Foil Tape with Conductive Adhesive - 25mm x 15 meter roll

[Copper Foil Tape with Conductive Adhesive - 25mm x 15 meter roll](https://www.adafruit.com/product/1127)
Copper tape can be an interesting addition to your toolbox. The tape itself is made of thin pure copper so its extremely flexible and can take on nearly any shape. You can easily solder to it, and the tape itself can carry current just like a wire. On the back is an electrically conductive...

In Stock
[Buy Now](https://www.adafruit.com/product/1127)
[Related Guides to the Product](https://learn.adafruit.com/products/1127/guides)
![Angled Shot of the Copper Foil Tape with Conductive Adhesive - 25mm x 15 meter roll.](https://cdn-shop.adafruit.com/640x480/1127-04.jpg)

You can use other conductive materials like paints! Either drip the paint into the pad itself and let it harden, or use alligator clips to connect from one pad to a paper with conductive paint on it.

 **Remember** : If you absolutely need more _capacitive touch_ pins, Signal **#1** , **#2** , **#3** , **#4** are four more capacitive touch inputs.

# Introducing Adafruit Crickit #MakeRobotFriend

## Programming Options

The method you choose to program your microcontroller and Crickit depends on what type of environment you are looking to use and available options. The chart below details which options are available with detailed descriptions on this page.

## Crickit with Circuit Playground Express

Programming this combination offers great flexibility. Here are the options:

- Microsoft MakeCode provides complete Circuit Playground Express support and complete Crickit support with the Crickit Extension available in the current releases. MakeCode is excellent for beginning students with a block interface. Support for sensors and peripherals not on the Circuit Playground Express is generally not available.
- CircuitPython is supported for all Circuit Playground Express and Crickit functionality. While CircuitPython may have require a bit more study, it is definitely worth it for the rich programmability, through high level and lower level libraries. CircuitPython support for various sensors and add-ons is excellent and under continual development. Development with the Mu editor offers error checking, serial output and plotting capabilities. Very fast to upload and make changes due to being an interpreted language.
- The Arduino IDE works with Circuit Playground Express and with Crickit as an add-on library. The number of drivers for peripherals and sensors is generally excellent and Arduino is suitable for creating new drivers depending on complexity. The learning curve is very high to understand both the built-in functionality and the underlying C/C++ syntax. Error messages may not be intuitive. Compilation times can slow down development. Serial monitor support is included.
- Native CPython support for this combination is not supported. Adafruit suggests using CircuitPython which has better CPython support than MicroPython.

## Crickit with Feather M0/M4 Express CircuitPython Supported Feather

Programming this combination offers great flexibility. Here are the options:

- Microsoft MakeCode requires a beta version which includes support for other processors.
- CircuitPython is supported for all CircuitPython compatible Feather boards and Crickit functionality. CircuitPython will NOT work on non-CircuitPython Feather boards such as the 32u4 Feathers, 328P Feather, M0 Basic Feathers. nRF52 support is still in development. ESP8266 support is limited. While CircuitPython may have require a bit more study, it is definitely worth it for the rich programmability, through high level and lower level libraries. CircuitPython support for various sensors and add-ons is excellent and under continual development. Development with the Mu editor offers error checking, serial output and plotting capabilities. Very fast to upload and make changes due to being an interpreted language.
- The Arduino IDE works with all Feather boards and with Crickit as an add-on library. The number of drivers for peripherals and sensors is generally excellent and Arduino is suitable for creating new drivers depending on complexity. The learning curve is very high to understand both the built-in functionality and the underlying C/C++ syntax. Error messages may not be intuitive. Compilation times can slow down development. Serial monitor support is included.
- Native CPython support for this combination is not supported. Adafruit suggests using CircuitPython which has better CPython support than MicroPython.

## Crickit with micro:bit Support

Programming this combination is good but is very limited for Python:

- Microsoft MakeCode provides complete micro:bit support and complete Crickit support with the Crickit Extension available **in the current beta release**. MakeCode is excellent for beginning students with a block interface. Support for sensors and peripherals not on the Circuit Playground Express is generally not available.
- CircuitPython is not currently supported for micro:bit. There is MicroPython for micro:bit. [See this Adafruit Guide for using CRICKIT with MicroPython and the micro:bit](https://learn.adafruit.com/using-micro-bit-and-crickit-with-micropython/).
- The Arduino IDE works with Circuit Playground Express and with Crickit as an add-on library. The number of drivers for peripherals and sensors is generally excellent and Arduino is suitable for creating new drivers depending on complexity. The learning curve is very high to understand both the built-in functionality and the underlying C/C++ syntax. Error messages may not be intuitive. Compilation times can slow down development. Serial monitor support is included.
- Native CPython support for this combination is not supported. Adafruit suggests using&nbsp; MicroPython if Python programmability is needed, but there is no Crickit or driver support from Adafruit.

## Crickit HAT for Raspberry Pi

Programming this combination offers flexibility for CPython only.

- Microsoft MakeCode support is not available.
- CircuitPython is supported for Raspberry Pi and Crickit HAT. CircuitPython requiresa bit of study, but it is definitely worth it for the rich programmability, through high level and lower level libraries. CircuitPython support for various sensors and add-ons is excellent and under continual development. Development with the Mu editor offers error checking, serial output and plotting capabilities. Very fast to upload and make changes due to being an interpreted language.
- The Arduino IDE does not work with the Raspberry Pi and Crickit HAT.
- Native CPython does not provide the library for Crickit. You should consider CircuitPython which is a subset of CPython with support for the Crickit HAT capabilities.

# Introducing Adafruit Crickit #MakeRobotFriend

## MakeCode

Info: 

With MakeCode, you can create robots simply and easily, using a drag-and-drop block interface. It's perfect for first time robot-makers, people who don't have a lot of coding experience, or even programmers who just want to get something going _fast_

MakeCode uses a web browser only, so no IDE is required to install. When you download a binary from MakeCode it is compiled for the Circuit Playground Express and you will overwrite any Arduino code or the CircuitPython runtime. You can always go back to programming other ways including Arduino (just use the Arduino IDE) or CircuitPython ([by re-installing CircuitPython as shown here](https://learn.adafruit.com/adafruit-crickit-creative-robotic-interactive-construction-kit/circuitpython-code))

# Get Comfy With MakeCode

[We recommend starting out by trying out the simple blinking NeoPixel example in our MakeCode guide, so you get a hang of how to install MakeCode apps on your Circuit Playground Express](https://learn.adafruit.com/makecode)

Once you feel comfortable with MakeCode, come back here and we'll add Crickit support!

# Adding Crickit Extension

Now you're a MakeCode'r and you are ready to add Crickit support.

**At this time, MakeCode support is being worked on and we're improving it every day, but it is Beta**

## For Circuit Playground Express and Feather Crickit (micro:bit is below)
Start by visiting [https://makecode.adafruit.com](https://makecode.adafruit.com/beta)

&nbsp;

Click on **New Project**

![circuit_playground_newp.png](https://cdn-learn.adafruit.com/assets/assets/000/054/680/medium640/circuit_playground_newp.png?1527695365)

In the list of blocks, select **ADVANCED** and then **EXTENSIONS**

![circuit_playground_ext.png](https://cdn-learn.adafruit.com/assets/assets/000/054/681/medium640/circuit_playground_ext.png?1527695428)

In the **Search Bar** type in **Crickit** and click the magnifying glass.

&nbsp;

**Click on the Crickit block** that shows up to install Crickit support!

![circuit_playground_crik.png](https://cdn-learn.adafruit.com/assets/assets/000/054/684/medium640/circuit_playground_crik.png?1527695567)

You will now have a new **CRICKIT** bin of blocks you can use! Continue on to learn how to use these blocks

![circuit_playground_crickit.png](https://cdn-learn.adafruit.com/assets/assets/000/054/685/medium640/circuit_playground_crickit.png?1527695908)

## For micro:bit Crickit
Start by visiting&nbsp;[https://makecode.microbit.org/beta](https://makecode.microbit.org/beta), **be sure to use the beta version** unless you see that Microsoft has made Crickit support standard in the Extensions category.

&nbsp;

&nbsp;

![circuit_playground_first.png](https://cdn-learn.adafruit.com/assets/assets/000/061/035/medium640/circuit_playground_first.png?1536250559)

In the list of blocks, select **Advanced** and then **Add Package**

![circuit_playground_second.png](https://cdn-learn.adafruit.com/assets/assets/000/061/036/medium640/circuit_playground_second.png?1536250741)

In the **Add Package... ?** screen, place the following web address into the **Search or enter project URL** box:

&nbsp;

[https://github.com/adafruit/pxt-crickit](https://github.com/adafruit/pxt-crickit)

&nbsp;

**Click on the Crickit block** that shows up to install Crickit support!

![circuit_playground_third.png](https://cdn-learn.adafruit.com/assets/assets/000/061/038/medium640/circuit_playground_third.png?1536250900)

You will now have a new **CRICKIT** bin of blocks you can use! Continue on to learn how to use these blocks

![circuit_playground_fourth.png](https://cdn-learn.adafruit.com/assets/assets/000/061/039/medium640/circuit_playground_fourth.png?1536251129)

Primary: 

# Introducing Adafruit Crickit #MakeRobotFriend

## MakeCode Servos

You can plug up to four servos in the **Servo** block of Crickit. The pin spacing is just right for servo connections.

&nbsp;

At left are the connections for the Circuit Playground Express and Crickit combination.

![circuit_playground_servos_bb.png](https://cdn-learn.adafruit.com/assets/assets/000/054/720/medium640/circuit_playground_servos_bb.png?1536158470)

And here is the Crickit for micro:bit (the micro:bit plugs into the Crickit but is not shown for clarity).

&nbsp;

The servo connections are identical to the other Crickits.

![circuit_playground_microbit-servos_bb.png](https://cdn-learn.adafruit.com/assets/assets/000/060/945/medium640/circuit_playground_microbit-servos_bb.png?1536158598)

Servos are so easy to use, you can control **four** independent servos - micro, mini, standard, metal gear or continuous rotation. Basically, if it has a 3-pin plug on the end and has 'servo' in the name, it'll work just fine.

Let's start with a simple demo that moves two servos back and forth:

![](https://cdn-learn.adafruit.com/assets/assets/000/054/730/medium800/circuit_playground_servodemo.png?1527717794)

[Open this example in MakeCode for Circuit Playground Express](https://makecode.com/_6gxi7y3VACDF)
[Open this example in MakeCode for micro:bit](https://makecode.microbit.org/_MuY7DPdLKXt1)
Warning: 

Controlling servos is basically the same through a Crickit as through MakeCode directly.

There's two blocks you can use, one for setting the angle and one for setting the pulse width directly

![](https://cdn-learn.adafruit.com/assets/assets/000/054/722/medium800/circuit_playground_seresrvo.png?1527716956)

We recommend using the angle block, its easier! Select which servo you want to use, from 1 through 4

![](https://cdn-learn.adafruit.com/assets/assets/000/054/723/medium800/circuit_playground_servonum.png?1527716998)

Then adjust the angle. Remember it does take a little time for the servo motor to move, so you can't just set it back and forth instantly, try adding a delay of a second after moving to make sure it got to the angle you want!

![](https://cdn-learn.adafruit.com/assets/assets/000/054/726/medium800/circuit_playground_angle.png?1527717073)

Although the angles range from 0 to 180, servos may have different ranges depending on the make and model. Also, each servo is a little different, so you may not get precisely the same angle even if its the same servo! Tweaking/adjusting the angle may be necessary.

To stop a continuous servo from running you have to set the speed around 0 or set its angle to around 90 degrees with `Crickit set servo .. angle to ..` (exact speed and angle is individual for each servo).

# Precise Pulses

For advanced use, you can hand-tune the pulse width. The 'standard' for servos is that 0 degrees is 1000 microseconds (us), 90 degrees is 1500 and 180 degrees is 2000 us. But...like we said, it can vary. You may want to try values as low as 750us and as high as 2500us! Just go slow, changing the values only 100us at a time, so you dont thwack the servo gears too far, they could be damaged if they push too far! For that reason, we recommend using angles only until you're comfy with servo usage

![](https://cdn-learn.adafruit.com/assets/assets/000/054/729/medium800/circuit_playground_precisepulse.png?1527717268)

# Introducing Adafruit Crickit #MakeRobotFriend

## MakeCode Drives

The **Drives** block on Crickit makes it super easy to connect higher current devices.

&nbsp;

At left shows the Circuit Playground Express and Crickit combination connected to several devices.

![circuit_playground_drives_bb.png](https://cdn-learn.adafruit.com/assets/assets/000/054/712/medium640/circuit_playground_drives_bb.png?1536158833)

The Crickit for micro:bit is just as versatile.

&nbsp;

Note the micro:bit is not shown at left, it would have to be plugged into the Crickit.

![circuit_playground_microbit-drives_bb.png](https://cdn-learn.adafruit.com/assets/assets/000/060/946/medium640/circuit_playground_microbit-drives_bb.png?1536159091)

The **Drive** output of your Crickit is perfect for 5V-powered solenoids, relays, vibration motors or high powered LEDs. You can drive up to 500mA per output, and 4 outputs available.

**Note that the 'positive' side of the electronic part you're driving has to connect to**  **5V** not Ground. You can just double/triple/quadruple wires into the same 5V terminal block.

![](https://cdn-learn.adafruit.com/assets/assets/000/062/040/medium800/circuit_playground_makecode-example.jpg?1537293350)

[Open this example in MakeCode for Circuit Playground Express](https://makecode.com/_aXzg5iFaeUu9)
[Open this example in MakeCode for micro:bit](https://makecode.microbit.org/_CCHdgiU3o2ek)
Each Drive output is a PWM output, that means you can change the amount of current or speed of whatever is connected.

![](https://cdn-learn.adafruit.com/assets/assets/000/062/041/medium800/circuit_playground_crickit-example.jpg?1537293432)

Select which Drive pin you want to control with the pull down, Drive 1 through 4 are labeled on the Crickit

![](https://cdn-learn.adafruit.com/assets/assets/000/054/718/medium800/circuit_playground_driveout.png?1527716155)

Then you can set the value from 0 (drive off) to 1023 (drive all the way on). If you want to dim an LED or run a vibration motor at half power, use 512. For quarter power, use 256!

![](https://cdn-learn.adafruit.com/assets/assets/000/054/717/medium800/circuit_playground_driveval.png?1527716106)

Remember you get 4 drive pins, so you can control them independently

# Changing the Drive Analog/PWM Frequency

You can set the analog frequency in an **On Start** block. We recommend 1000 Hz (1 KHz) its a good standard number. Advanced makers can tweak this!

![](https://cdn-learn.adafruit.com/assets/assets/000/054/716/medium800/circuit_playground_drivestart.png?1527716033)

# Introducing Adafruit Crickit #MakeRobotFriend

## MakeCode DC Motors

Zoom! Cricket is a great motor driver platform and with MakeCode, it's super easy to use. Just connect to the Crickit **Motor** block.

&nbsp;

The Crickit with Circuit Playground Express is shown first at left.

&nbsp;

Note the GND terminal is not usually used with motors.

![circuit_playground_dcmotors_bb.png](https://cdn-learn.adafruit.com/assets/assets/000/054/686/medium640/circuit_playground_dcmotors_bb.png?1536159343)

And using motors with micro:bit is just as easy.

&nbsp;

Note: the micro:bit is not shown in the diagram at left for clarity, you'll need to plug one into the Crickit slot to have everything work.

![circuit_playground_microbit-dcmotors_bb.png](https://cdn-learn.adafruit.com/assets/assets/000/060/947/medium640/circuit_playground_microbit-dcmotors_bb.png?1536159518)

You can drive two separate DC motors, so lets go ahead and get right to it!

DC motors are controlled by 4 PWM (adjustable speed) output pins, the 4 pins let you control speed _and_ direction. And we'll use our **CRICKIT Motors** block set to help us manage the speed and direction for us, making it very easy to control motors

Note that each DC motor is a little different, so just because you have two at the same speed does not mean they'll rotate at the _exact_ same speed! Some tweaking may be required

![](https://cdn-learn.adafruit.com/assets/assets/000/054/687/medium800/circuit_playground_mototrs.png?1527696180)

Here's an example program that will move a single motor in different speeds and directions

# Setting Motor Speed

You can set the speed of the motor from 0% to 100% with this block. You can select which motor to use, 1 or 2. Once you set the speed of the motor it will continue at that speed until you change it or ask it to stop.

![](https://cdn-learn.adafruit.com/assets/assets/000/054/696/medium800/circuit_playground_run_motor.png?1527706813)

You can change direction by having a **negative** percentage speed!

![](https://cdn-learn.adafruit.com/assets/assets/000/054/697/medium800/circuit_playground_directionchange.png?1527706859)

You may want to have two motors move at the same time so they act like wheels on a car. In that case, you can use this handy block that will control two motors at once!

![](https://cdn-learn.adafruit.com/assets/assets/000/054/698/medium800/circuit_playground_tankmot.png?1527706969)

You can set the two speeds at once. If both move at the same positive speed, the tank/car will move forward. Same negative speed it will move backward. If one side moves faster than the other, the car will turn.

If you want to 'invert' the motor, it will flip which direction positive/negative numbers go. That is, if positive was forward, now positive will mean backwards

This is sometimes handy if you want to use only positive numbers or to keep your code looking tidy.

![](https://cdn-learn.adafruit.com/assets/assets/000/054/699/medium800/circuit_playground_motorinv.png?1527707148)

# Introducing Adafruit Crickit #MakeRobotFriend

## MakeCode Steppers

Stepper motors are used in many projects and you can use them with Crickit and MakeCode.

&nbsp;

The Circuit Playground Express + Crickit connections are shown at left.

![circuit_playground_dual_bb.png](https://cdn-learn.adafruit.com/assets/assets/000/057/319/medium640/circuit_playground_dual_bb.png?1536159759)

And the micro:bit can control stepper motors also when plugged into the micro:bit version of Crickit (micro:bit not shown for clarity).

![circuit_playground_microbit-dual-steppers_bb.png](https://cdn-learn.adafruit.com/assets/assets/000/060/948/medium640/circuit_playground_microbit-dual-steppers_bb.png?1536159903)

You can control one or two stepper motors on Crickit. The **Motor** block can drive one bipolar stepper (wiring shown above) or one unipolar stepper. In addition, the **Drive** block can control one stepper also but it **must** be unipolar (bipolar will not work on the **Drive** port).

Primary: 

## MakeCode for Using a Stepper on the Motor Port

In the **CRICKIT** block group, scroll down until you see the **Stepper** heading and the block `crickit stepper move` block. Be sure **not** to use the `crickit drive stepper move block`, that is for using a unipolar stepper on the **Drive** port, discussed further down the page.

![](https://cdn-learn.adafruit.com/assets/assets/000/057/325/medium800/circuit_playground_use_stepper.png?1531152878)

## Move the Motor Port Stepper One Direction Forever

Here is a simple program that tells the stepper to move 20 steps, then wait 10 milliseconds, and repeats forever:

![](https://cdn-learn.adafruit.com/assets/assets/000/061/046/medium800/circuit_playground_stepper.png?1536254263)

You'll see the motor shaft slowly turning in the "positive" direction. If you use a bit of solid tape on the stepper's shaft as a small flag, you can see the rotation better. If the rotation is in the wrong direction, use a negative value for the number of steps, re. `-20`.

At this point, you can vary the parameters: increase or decrease the number of steps moved every loop. If you want the stepper to move faster, increase the steps. This may make the action a bit "jerky". If so, you can decrease the steps. This will be smooth, but slow. To increase the pause between steps, you can use the `pause`&nbsp;block to get times greater than 10 milliseconds.

# Using a Stepper on the Drive Port in MakeCode

In the **CRICKIT** block group, scroll down until you see the **Stepper** heading and the block `crickit drive stepper move` block.

![](https://cdn-learn.adafruit.com/assets/assets/000/057/312/medium800/circuit_playground_drive_stepper.png?1531152289)

## Move the Drive Port Stepper One Direction Forever

Here is a simple program that tells a stepper on the **Drive** port to move 20 steps, then waits ten milliseconds, and repeats forever. 10 milliseconds delay between step blocks is the minimum to ensure the stepper doesn't miss any steps between blocks.

![](https://cdn-learn.adafruit.com/assets/assets/000/061/047/medium800/circuit_playground_stepper-drive.png?1536254378)

If you want to move the motor in the opposite direction, make the movement value negative, re. `-20`. The block takes positive and negative values.

# Introducing Adafruit Crickit #MakeRobotFriend

## MakeCode Signals

Danger: 

The **Signals** block on Crickit allows you to expand your general-purpose inputs and outputs (GPIO).

&nbsp;

The Circuit Playground Express and Crickit combination is at left.

![circuit_playground_signals-pullup_bb.png](https://cdn-learn.adafruit.com/assets/assets/000/075/493/medium640/circuit_playground_signals-pullup_bb.png?1557417719)

Warning: 

You may want to add buttons, LEDs, switches or simple sensors to your robot project. With Crickit, you get 8 x 'general purpose in/out' (GPIO) pins called **signals**. Each signal can be a digital input (button/switch), digital output (LED, for example), or _analog input._

This lets you add a ton of external components easily, and its all handled by seesaw. Perfect when you have a Feather without analog inputs (like the ESP8266) or just need a ton of extra pins.

The signal pins are on a 3x8 female header, so you can poke wires directly in!

## Using Signals in MakeCode

MakeCode has three blocks under the CRICKIT group to help you work with signals:

- `crickit digital read signal` allows you to read digital values in&nbsp;
- `crickit analog read signal` reads a signal and provides an analog value from 0-1023
- `crickit digital write signal` allows you to write out to a signal line

Analog read returns a number so the block is rounded to place where a number may be used. Digital read is angled so it fits where a decision like `if..then..else` blocks use. Write signal is a block of its own and will set a signal (Make it `HIGH`&nbsp; / 3.3 volts or `LOW`&nbsp;/ 0 volts).

![](https://cdn-learn.adafruit.com/assets/assets/000/057/360/medium800/circuit_playground_makecode_signals.png?1531165105)

## Digital Reads and Writes
Here's an example wiring that goes with the code below.

We have two switch buttons, connected to **signals #1** and **#2** , the other side of the buttons connect to ground

There's also two LEDs, connected to the **signals #3** and **#4** and the negative wires connected to ground. (All the 3.3V and Ground pins are connected together so you don't&nbsp;_have_&nbsp;to use the ones right next to the signal pin!)

Note the pull up resistors for the buttons. Seesaw does not allow enabling internal pullup or pulldown resistors at present. Also 330 ohm current limit resistors are shown for the LEDs.

![circuit_playground_signals-pullup-2button_bbb.png](https://cdn-learn.adafruit.com/assets/assets/000/075/492/medium640/circuit_playground_signals-pullup-2button_bbb.png?1557417549)

Here is the MakeCode that reads the buttons on **signal #1** and **#2** and lights **signal #3** and **signal #4** if the corresponding button is pressed:

![](https://cdn-learn.adafruit.com/assets/assets/000/057/377/medium800/circuit_playground_crickit_signal.png?1531166262)

[Open this example in MakeCode for Circuit Playground Express](https://makecode.com/_czXMKci2L9px)
[Open this example in MakeCode for micro:bit](https://makecode.microbit.org/_Efx6U732c76H)
## Analog Reads
You can also read analog values like from a potentiometer or sensor.

&nbsp;

Lets do a demonstration where the center tap of a potentiometer is hooked up to **Signal #3** - don't forget to also connect one side of the potentiometer to 3.3V and the other side to ground.

![circuit_playground_signalpot_bb.png](https://cdn-learn.adafruit.com/assets/assets/000/057/380/medium640/circuit_playground_signalpot_bb.png?1531166433)

And here is the example code. You can see we read the signal with `crickit analog read signal`&nbsp;which returns a value from 0 to 1023.

## For Crickit and Circuit Playground Express

The `map` **MATH** function changes 0 to 1023 to 0 to 9. The `graph` **NEOPIXEL** block will light the number of NeoPixels `map` returns in rainbow colors.

Be sure the potentiometer is connected to **Crickit Signal 3** and not one of the other Signal terminals.

![](https://cdn-learn.adafruit.com/assets/assets/000/058/787/medium800/circuit_playground_potentiometer.png?1533823865)

[Load this Circuit Playground Express example into MakeCode](https://makecode.com/_Hx1DzPKCHL4i)
## For Crickit and micro:bit

The code displays a `heart icon` on the micro:bit display. The brightness is changed by taking the reading from the potentiometer connected to **Crickit Signal 3** (0 to 1023) and dividing by 4 to get a `brightness` from 0 to 255. So the potentiometer is essentially a manual brightness control for the micro:bit LED array.

![](https://cdn-learn.adafruit.com/assets/assets/000/061/044/medium800/circuit_playground_potentiometer.png?1536254111)

[Load this micro:bit example in MakeCode](https://makecode.microbit.org/_LHtAb1PgrbkH)
# Introducing Adafruit Crickit #MakeRobotFriend

## MakeCode Touch

Warning: 

There are four capacitive touch pads you can use to detect human touch. They have big pads you can use to attach alligator clips to extend the pads' reach.

&nbsp;

You can connect the other end of the alligator wires to fruit and make your own fruit-touch robot. Or move servo motors based on touch, it's all fun.

![circuit_playground_captouchy_bb.png](https://cdn-learn.adafruit.com/assets/assets/000/057/434/medium640/circuit_playground_captouchy_bb.png?1531225123)

Touch is identical on the micro:bit version of Crickit.

![circuit_playground_microbit-touch_bb.png](https://cdn-learn.adafruit.com/assets/assets/000/060/950/medium640/circuit_playground_microbit-touch_bb.png?1536160312)

You can read the value of the captouch pads from the MakeCode **CRICKIT** block group, block `crickit read touch`. This will return a value that is the change in value, touched vs. not.

## Example for Crickit plus Circuit Playground Express or Feather

The program below sets up Crickit capacitive touch on pads 1, 2, 3 and 4. It then loops forever - if you touch a pad, it lights a NeoPixel. Pressing Button A clears the NeoPixels.

![](https://cdn-learn.adafruit.com/assets/assets/000/058/789/medium800/circuit_playground_captouch.png?1533827798)

[Open this Circuit Playground Express example in MakeCode](https://makecode.com/_cb64i53kKhFh)
You can set different actions: if a touch is detected, change the direction of a motor as just one example.

## Example for Crickit and micro:bit

If you touch the capacitive touch pads, the one NeoPixel on the Crickit will glow (pad 1), get broighter (pads 2 and 3) and go out (pad 4).

![](https://cdn-learn.adafruit.com/assets/assets/000/061/043/medium800/circuit_playground_touch.png?1536253586)

[Open this micro:bit Example in MakeCode](https://makecode.microbit.org/_XhrJz5R2E0qx)
# Introducing Adafruit Crickit #MakeRobotFriend

## MakeCode Audio

Crickit provides an amplified audio output via the **Speaker** block.

&nbsp;

For the Circuit Playground Express + Crickit version, we take advantage of the CPX ability to play WAV files over the true-analog output pin **A0**.

![circuit_playground_speaker.png](https://cdn-learn.adafruit.com/assets/assets/000/057/436/medium640/circuit_playground_speaker.png?1536160389)

The micro:bit version of Cricket also has amplified audio output.

&nbsp;

The micro:bit is not shown in the diagram at left, just plug a micro:bit into the slot in the middle of Cricket in the direction indicated.

&nbsp;

The audio pin used on the micro:bit is pin **P0** which has a small speaker icon on it on the Crickit where the micro:bit pin numbers are listed.

![circuit_playground_microbit-speaker_bb.png](https://cdn-learn.adafruit.com/assets/assets/000/060/951/medium640/circuit_playground_microbit-speaker_bb.png?1536160597)

Audio animatronics! By adding a voice or sound effects to your robot you can make a cool interactive project.&nbsp;

This is one of the _few_ outputs that does not go through the Crickit's seesaw helper chip. Instead, the audio is played directly from the microcontroller board and the Crickit amplifies it!

# Amplifier Details

The onboard amplifier is a mono "Class D" audio amp with BTL (Bridge Tied Load) output.

That means **you cannot plug the speaker output into another amplifier, it must connect directly to a speaker!**

You can use just about _any_ 4 to 8Ω speaker (6 Ω is OK too, just not as common). The amplifier can drive up to 3 Watts into 4Ω and 1 Watt into 8Ω. That means its ok to drive a 5 Watt speaker, it just wont be as loud as it _could_ be with a bigger amp (but you wont damage the amp). You can also drive speakers that are smaller, like an 8Ω 0.5 W but make sure you don't turn the audio volume potentiometer up, as it could damage the speaker by overpowering it.

# Playing Sounds on Crickit with MakeCode

If you are using a Crickit with Circuit Playground Express (CPX), the Crickit becomes an amplified extension of the regular audio out. The sound is very clear and the volume can be higher than the CPX on-board speaker. Below I've taken a cute song snippet and reduced the volume from a previous value of&nbsp;`100` to `34` so one's ears don't hurt when it starts. If the slide switch is moved left (towards the on-board speaker on CPX), the song will play, moving the switch right silences it. If you think the speed of the sound (the _tempo_) is too fast, press button A to slow it down. If you think the tempo is too slow, press the B button.

## Circuit Playground and Feather Crickit Version (micro:bit below)
![](https://cdn-learn.adafruit.com/assets/assets/000/057/437/medium800/circuit_playground_crickit-snake-sound.png?1531230468)

You can download the code by clicking this link to link to the MakeCode website.

[Open this example in MakeCode for Circuit Playground Express](https://makecode.com/_atzgEEDeyEUK)
Check out all the music blocks, you can have Crickit using sounds in projects with just a couple of clicks!

![](https://cdn-learn.adafruit.com/assets/assets/000/057/438/medium800/circuit_playground_music_blocks.png?1531230993)

## micro:bit Version

The blocks available for music are a tiny bit different:

![](https://cdn-learn.adafruit.com/assets/assets/000/061/040/medium800/circuit_playground_sound.png?1536252015)

Warning: 

Here is the song code for micro:bit:

![](https://cdn-learn.adafruit.com/assets/assets/000/061/041/medium800/circuit_playground_song.png?1536252039)

[Load this example in MakeCode for micro:bit](https://makecode.microbit.org/_XmxC48aC9Ty5)
# Introducing Adafruit Crickit #MakeRobotFriend

## MakeCode NeoPixels

The Circuit Playground Express version of Crickit hardwires the NeoPixel control to Circuit Playground Express pad A1 as shown at left.

&nbsp;

MakeCode knows all about it and provides support via the **LIGHTS** block group which will show a **NEOPIXELS** sub block group for handling strips and other "off-board" NeoPixels like the **NeoPixel** terminal on Crickit.

&nbsp;

There is also one Crickit NeoPixel MakeCode allows you to control.

![circuit_playground_neopix-all-label.jpg](https://cdn-learn.adafruit.com/assets/assets/000/057/443/medium640/circuit_playground_neopix-all-label.jpg?1536160855)

Cricket connected NeoPixels are connected to the three terminals on the NeoPixel block as shown at left for the micro:bit version of Crickit.

&nbsp;

GND is connected to GND, +5V to 5V, and the middle arrow terminal to the NeoPixel's Din pin.

&nbsp;

You will need to add the appropriate microcontroller (Circuit Playground Express or micro:bit) to the appropriate version of Crickit to control things, of course (they are not shown for clarity).

![circuit_playground_microbit-neopixels_bb.png](https://cdn-learn.adafruit.com/assets/assets/000/060/952/medium640/circuit_playground_microbit-neopixels_bb.png?1536161319)

Crickit easily allows you to work with NeoPixels. There is one on-board to the right of the Capacitive Touch pads. There is also a terminal block called NeoPixel next to the Crickit Speaker terminal output. The NeoPixel terminal connections makes it super easy to use a strip or ring of NeoPixels to light up anything.&nbsp;

# MakeCode for Crickit NeoPixels
## Using the Crickit Onboard Single NeoPixel&nbsp;
![](https://cdn-learn.adafruit.com/assets/assets/000/057/440/medium800/circuit_playground_neopixel_all.png?1531232926 Blocks for MakeCode for Circuit Playground Express and Crickit)

![](https://cdn-learn.adafruit.com/assets/assets/000/061/042/medium800/circuit_playground_singlepixel.png?1536252274 Blocks for MakeCode for micro:bit )

You can use the three special NeoPixel blocks in the **CRICKIT** &nbsp;block group extension to change the single NeoPixel on-board Crickit. They work just like the NeoPixel blocks under the **LIGHT** block group but just for the one Crickit pixel.&nbsp;

## Crickit for Circuit Playground Express and Feather (micro:bit is below)

Within MakeCode for Circuit Playground Express, in the **LIGHT** block group, there is a special subgroup that pops below **LIGHT** when **LIGHT** is pushed called **... NEOPIXEL**. This provides a huge number of blocks to work with NeoPixels that are not on your Crickit or the microcontroller on Crickit like a Circuit Playground Express.

When you use the MakeCode NeoPixel blocks to manipulate your Crickit connected NeoPixels, you need to use the **NEOPIXEL** subgroup block labeled&nbsp;`set strip to create strip`.

![](https://cdn-learn.adafruit.com/assets/assets/000/057/442/medium800/circuit_playground_neopixel_meny.png?1531234050)

For the code below, it assumes a connected&nbsp;[30 NeoPixel strip](https://www.adafruit.com/product/1460?length=1 "NeoPixels in the Adafruit Shop") to the Crickit NeoPixel terminal block.

When the program starts, the `on start` code up the variable named `strip` to refer to a NeoPixel strip connected to `A1` (which all Circuit Playground Express Crickit strips are connected to) with `30` NeoPixels on it (You have to click the `+` on the block to specify the pin `A1` and add the number of NeoPixels.

![](https://cdn-learn.adafruit.com/assets/assets/000/062/042/medium800/circuit_playground_cpx-example.jpg?1537294407)

[Open this example in MakeCode for Circuit Playground Express](https://makecode.com/_hpg2VWMzTFA5)
## For micro:bit + Crickit

For micro:bit, there is a small sun icon on Pin **P16** on Crickit to help you remember that is the pin connected for NeoPixels.

You will probably need to add the NeoPixels extension to MakeCode for NeoPixel control. Click the **Advanced** button then **Add Package**. Select the _Adafruit NeoPixels_ extension. You will now have a new code block group called **Neopixel** which has the blocks you want to control the NeoPixel strip.

The code below does what the above code does for CPX - creates a strip of 30 NeoPixels connected to Pin 16 and then displays a rainbow animation forever.

![](https://cdn-learn.adafruit.com/assets/assets/000/061/844/medium800/circuit_playground_Capture2.jpg?1536932555)

[Open this example in MakeCode for micro:bit](https://makecode.microbit.org/_epmEWVYjhP0o)
Then the program shows the rainbow animation on the strip forever. You can do lots of other things on your strip. It's that easy!

## For More Information

See the tutorial [Make It Glow with Crickit](https://learn.adafruit.com/make-it-glow-with-crickit?view=all).

# Introducing Adafruit Crickit #MakeRobotFriend

## CircuitPython Code

Info: 

To use Crickit, we recommend CircuitPython. Python is an easy programming language to use, programming is fast, and its easy to read.

# Install CPX Special Build

If you're using Circuit Playground Express (CPX), Please install this special 'seesaw' version of the CPX firmware. Plug the USB cable into the CPX, double click the reset button until you see **CPLAYBOOT** drive, then drag the UF2 file onto the disk drive:

[Download the special version of CircuitPython for CPX mounted on Crickit](https://circuitpython.org/board/circuitplayground_express_crickit/)
What's nice about this special version is that the **adafruit\_crickit** , **adafruit\_seesaw** and **adafruit\_motor** library is built in, which saves you tons of space and makes it really fast to get started

Warning: As this version of CircuitPython already has the Crickit and Seesaw libraries "baked in", ensure that the **/lib** directory on your CircuitPython device (**CIRCUITPY**) does NOT contain the `adafruit_crickit` or `adafruit_seesaw` library as they may conflict and it could unnecessarily use additional memory.

 **Click the link above to download the latest UF2 file**

&nbsp;

Download and save it to your Desktop (or wherever is handy)

![circuit_playground_uf2.png](https://cdn-learn.adafruit.com/assets/assets/000/055/066/medium640/circuit_playground_uf2.png?1528232280)

Plug your Circuit Playground Express into your computer using a known-good USB cable

&nbsp;

**A lot of people end up using charge-only USB cables and it is very frustrating! So make sure you have a USB cable you know is good for data sync**

&nbsp;

Double-click the small **Reset** button in the middle of the CPX, you will see all of the LEDs turn green. If they turn all red, check the USB cable, try another USB port, etc.

&nbsp;

(If double-clicking doesn't do it, try a single-click!)

![circuit_playground_led_strips_3333_giffy1.gif](https://cdn-learn.adafruit.com/assets/assets/000/055/067/medium640thumb/circuit_playground_led_strips_3333_giffy1.jpg?1528232309)

![circuit_playground_cpx-in-bootloader.jpg](https://cdn-learn.adafruit.com/assets/assets/000/055/068/medium640/circuit_playground_cpx-in-bootloader.jpg?1528232319)

You will see a new disk drive appear called CPLAYBOOT  
  
&nbsp;  
  
Drag the **.uf2** file onto it.

![circuit_playground_cplayboot.gif](https://cdn-learn.adafruit.com/assets/assets/000/055/069/medium640/circuit_playground_cplayboot.gif?1528232420)

![circuit_playground_drag.png](https://cdn-learn.adafruit.com/assets/assets/000/055/070/medium640/circuit_playground_drag.png?1528232446)

The **CPLAYBOOT** drive will disappear and a new disk drive will appear called **CIRCUITPY**

&nbsp;

That's it! You're done :)

![circuit_playground_circuipy.png](https://cdn-learn.adafruit.com/assets/assets/000/055/071/medium640/circuit_playground_circuipy.png?1528232551)

# Introducing Adafruit Crickit #MakeRobotFriend

## CircuitPython Servos

To the left are the connections for the Crickit with the Circuit Playground Express.

&nbsp;

Note: The black wire on the servo connectors always points inward towards the microcontroller and center of Crickit. The light wire: yellow, orange, white, etc. faces outward from the Crickit.

![circuit_playground_servos_bb.png](https://cdn-learn.adafruit.com/assets/assets/000/054/068/medium640/circuit_playground_servos_bb.png?1536153056)

Here is the Feather Crickit connected to four servos.

![circuit_playground_feather-servos_bb.png](https://cdn-learn.adafruit.com/assets/assets/000/060/930/medium640/circuit_playground_feather-servos_bb.png?1536153142)

The Crickit HAT for Raspberry Pi can also control up to 4 servos like other Crickit boards. Note the location of the Servo header block with 4 rows of three male pins.

![circuit_playground_Pi3-and-Crickit_HAT-Servos_bb.png](https://cdn-learn.adafruit.com/assets/assets/000/062/077/medium640/circuit_playground_Pi3-and-Crickit_HAT-Servos_bb.png?1537371566)

# Test Servos

Lets start by controlling some servos. You'll want at least one servo to plug in and test out the servo code. [Visit our recommended servo page to check that you have a servo that works](../../../../cpx-crickit/recommended-servos). Once you do, plug in a servo into **SERVO #1** spot, making sure the yellow or white wire is next to the **1** text label.

This example will show rotating one servo from 0 to 180 degrees with a stop at 90 degrees.

```auto
import time
from adafruit_crickit import crickit

print("1 Servo demo!")

while True:
    print("Moving servo #1")
    crickit.servo_1.angle = 0      # right
    time.sleep(1)
    crickit.servo_1.angle = 90     # middle
    time.sleep(1)
    crickit.servo_1.angle = 180    # left
    time.sleep(1)
    crickit.servo_1.angle = 90     # middle
    time.sleep(1)
    # and repeat!
```

Warning: 

We start by importing the libraries that we need to have time delays ( `import time` ) and then the main crickit python library that will make it super easy to talk to the motors and sensors on crickit (`from adafruit_crickit import crickit`)

The `crickit` object represents the motors and servos available for control. The servos are available on the sub-objects named `servo_1`, `servo_2`, `servo_3`, `servo_4`

Each of these are [adafruit\_motor.servo](https://circuitpython.readthedocs.io/projects/motor/en/latest/api.html?highlight=servo#adafruit-motor-servo) type objects for the curious

## Control Servo

Now that we know the servo objects, we can simply assign the angle! `crickit.servo_1.angle = 0` is all the way to the left,&nbsp;`crickit.servo_1.angle = 90` is in the middle, and&nbsp;`crickit.servo_1.angle = 180` is all the way to the right. You'll want to test this to ensure it works with your specific servo, as 0 might be to the right and 180 to the left if it was geared differently.

# More Servos!

OK that was fun but you want MORE servos right? You can control up to four!

```auto
import time
from adafruit_crickit import crickit

print("4 Servo demo!")

# make a list of all the servos
servos = (crickit.servo_1, crickit.servo_2, crickit.servo_3, crickit.servo_4)

while True:
    # Repeat for all 4 servos
    for my_servo in servos:
        # Do the wave!
        print("Moving servo #", servos.index(my_servo)+1)
        my_servo.angle = 0      # right
        time.sleep(0.25)
        my_servo.angle = 90     # middle
        time.sleep(0.25)
        my_servo.angle = 180    # left
        time.sleep(0.25)
        my_servo.angle = 90     # middle
        time.sleep(0.25)
        my_servo.angle = 0      # right

```

This example is similar to the 1 servo example, but instead of accessing the`crickit.servo_1` object directly, we'll make a **list** called `servos` that contains 4 servo objects with

`servos = (crickit.servo_1, crickit.servo_2, crickit.servo_3, crickit.servo_4)`

Then we can access the individual using `servo[0].angle = 90` or iterate through them as we do in the loop. You don't _have_ to do it this way, but its very compact and doesn't take a lot of code lines to create all 4 servos at once!

Warning: 

# Min/Max Pulse control

Originally servos were defined to use 1.0 millisecond to 2.0 millisecond pulses, at 50 Hz to set the 0 and 180 degree locations. However, as more companies started making servos they changed the pulse ranges to 0.5ms to 2.5ms or even bigger ranges. So, not all servos have their full range at thoe 'standard' pulse widths. You can easily tweak your code to change the min and max pulse widths, which will let your servo turn more left and right. **But** don't set the widths too small/large or you can hit the hard stops of the servo which could damage it, so try tweaking the numbers slowly until you get a sense of what the limits are for your motor.

All you need to do is add a line at the top of your code like this

`crickit.servo_1.set_pulse_width_range(min_pulse=500, max_pulse=2500)`

The above is for Crickit Servo #1, you'll need to duplicate and adjust for all other servos, but that way you can customize the range uniquely per servo!

Here we've change the minimum pulse from the default ~750 microseconds to 500, and the default maximum pulse from 2250 microseconds to 2500. Again, **each servo differs**. Some experimentation may be required!

```auto
import time
from adafruit_crickit import crickit

print("1 Servo demo with custom pulse widths!")

crickit.servo_1.set_pulse_width_range(min_pulse=500, max_pulse=2500)

while True:
    print("Moving servo #1")
    crickit.servo_1.angle = 0      # right
    time.sleep(1)
    crickit.servo_1.angle = 180    # left
    time.sleep(1)
```

# Continuous Rotation Servos

If you're using continuous servos, you can use the angle assignments and just remember that 0 is rotating one way, 90 is 'stopped' and 180 and rotating the other way. Or, better yet, you can use the `crickit.continuous_servo_1` object instead of the plain `servo_1`

Again, you get up to 4 servos. You can mix 'plain' and 'continuous' servos

```auto
import time
from adafruit_crickit import crickit

print("1 Continuous Servo demo!")

while True:
    crickit.continuous_servo_1.throttle = 1.0 # Forwards
    time.sleep(2)
    crickit.continuous_servo_1.throttle = 0.5 # Forwards halfspeed
    time.sleep(2)
    crickit.continuous_servo_1.throttle = 0   # Stop
    time.sleep(2)
    crickit.continuous_servo_1.throttle = -0.5 # Backwards halfspeed
    time.sleep(2)
    crickit.continuous_servo_1.throttle = -1 # Forwards
    time.sleep(2)
    crickit.continuous_servo_1.throttle = 0   # Stop
    time.sleep(2)
```

If your continuous servo doesn't stop once the loop is finished you may need to tune the `min_pulse` and `max_pulse` timings so that the center makes the servo stop. Or check if the servo has a center-adjustment screw you can tweak.

# Disconnecting Servos or Custom Pulses

If you want to 'disconnect' the Servo by sending it 0-length pulses, you can do that by 'reaching in' and adjusting the underlying PWM duty cycle with:

`crickit.servo_1._pwm_out.duty_cycle = 0`

or

`crickit.servo_1._pwm_out.fraction = 0`

Likewise you can set the duty cycle to a custom value with

`crickit.servo_1._pwm_out.duty_cycle = number`

where `number` is between 0 (off) and 65535 (fully on). For example, setting it to 32767 will be 50% duty cycle, at the 50 Hz update rate

Or you can use fractions like `crickit.servo_1._pwm_out.fraction = 0.5`

```auto
import time
from adafruit_crickit import crickit

print("1 Servo release demo!")

while True:
    print("Moving servo #1")
    crickit.servo_1.angle = 0      # right
    time.sleep(10)
    print("Released")
    crickit.servo_1._pwm_out.duty_cycle = 0
    time.sleep(10)
    # and repeat!

```

# Introducing Adafruit Crickit #MakeRobotFriend

## CircuitPython Drives

The Crickit with Circuit Playground Express is shown at left.

&nbsp;

All the red wires connect to the **Drives** 5V terminal and the other wire connected to individual **Drive** terminals.

![circuit_playground_drives_bb.png](https://cdn-learn.adafruit.com/assets/assets/000/054/063/medium640/circuit_playground_drives_bb.png?1536153303)

Using Drives with the Feather-based Crickit is shown at left.

&nbsp;

Note: For CircuitPython, you need to use a CircuitPython-compatible Feather board.

![circuit_playground_feather-drives_bb.png](https://cdn-learn.adafruit.com/assets/assets/000/060/931/medium640/circuit_playground_feather-drives_bb.png?1536153412)

Crickit HAT for Raspberry Pi can also drive four devices via the Drive ports.

![circuit_playground_Pi3-and-Crickit_HAT-Drives_bb.png](https://cdn-learn.adafruit.com/assets/assets/000/062/078/medium640/circuit_playground_Pi3-and-Crickit_HAT-Drives_bb.png?1537372270)

# Test Drive

Lets start by controlling a drive output. You'll need to plug something into the **5V** and **DRIVE1** terminal blocks. I'm just using a simple LED with resistor but anything that can be powered by 5V will work.

- Note that the drive outputs cannot have 5V output so you must connect the **positive** pin of whatever you're driving to **5V**. Don't try connecting the positive pin to the drive, and the negative pin to **GND** , it wont work!
- Drive outputs are PWM-able!

This example will show turning the drive output fully on and off once a second:

```auto
import time
from adafruit_crickit import crickit

print("1 Drive demo!")

crickit.drive_1.frequency = 1000

while True:
    crickit.drive_1.fraction = 1.0  # all the way on
    time.sleep(0.5)
    crickit.drive_1.fraction = 0.0  # all the way off
    time.sleep(0.5)
    crickit.drive_1.fraction = 0.5  # half on/off
    time.sleep(0.5)
    # and repeat!
```

We start by importing the libraries that we need to have time delays ( `import time` ) and then the main crickit python library that will make it super easy to talk to the motors and sensors on crickit (`from adafruit_crickit import crickit`)

The `crickit` object represents the drive outputs available for control. The drives are available on the sub-objects named `drive_1`, `drive_2`, `drive_3`, `drive_4`

**Note that for the Feather Crickit, these are** `feather_drive_1`, `feather_drive_2`, `feather_drive_3`, **and** `feather_drive_4`.

## Set PWM Frequency

Drive outputs are all PWM outputs too, so not only can they turn fully on and off, but you can also set it half-way on. In general, the default frequency for PWM outputs on seesaw is 1000 Hz, so set the frequency to 1 KHz with `crickit.drive_1.frequency = 1000`. Even if you aren't planning to use the PWM output, please set the frequency!

**Note that all the Drive outputs share the same timer so if you set the frequency for one, it will be the same for all of them.**

## Control Drive Output

Now that we have a drive pwm object, we can simply assign the PWM duty cycle with the fraction property!

- `crickit.drive_1.fraction = 0.0` turns the output completely off (no drive to ground, no current draw).
- `crickit.drive_1.fraction = 1.0` turns the output completely on (fully drive to ground)
- And, not surprisingly `crickit.drive_1.fraction = 0.5` sets it to 1/2 on and 1/2 off at the PWM frequency set above.

# More Drivers!

OK that was fun but you want MORE drives right? You can control up to four!

```auto
import time
from adafruit_crickit import crickit

print("4 Drive demo!")

drives = (crickit.drive_1, crickit.drive_2, crickit.drive_3, crickit.drive_4)

for drive in drives:
    drive.frequency = 1000

while True:
    for drive in drives:
        print("Drive #", drives.index(drive)+1)
        drive.fraction = 1.0  # all the way on
        time.sleep(0.25)
        drive.fraction = 0.0  # all the way off
        time.sleep(0.25)
        # and repeat!

```

This example is similar to the 1 drive example, but instead of accessing the `crickit.drive_1` object directly, we'll make a **list** called `drives` that contains 4 drive objects with

```
drives = (crickit.drive_1, crickit.drive_2, crickit.drive_3, crickit.drive_4)
```

Then we can access the individual using `drives[0].fraction = 0.5` or iterate through them as we do in the loop. You don't _have_ to do it this way, but its very compact and doesn't take a lot of code lines to create all 4 drives at once!

# Introducing Adafruit Crickit #MakeRobotFriend

## CircuitPython DC Motors

Connections from DC motors to the Circuit Playground Express Crickit is shown at left. There are two **Motor** drivers, labeled **1** and **2**.

&nbsp;

The center **GND** terminal is not used for most DC Motor applications.

![circuit_playground_dcmotors_bb.png](https://cdn-learn.adafruit.com/assets/assets/000/054/061/medium640/circuit_playground_dcmotors_bb.png?1536153517)

The Feather Crickit connections for the Motor terminals is shown at left.

![circuit_playground_feather-dcmotors_bb.png](https://cdn-learn.adafruit.com/assets/assets/000/060/932/medium640/circuit_playground_feather-dcmotors_bb.png?1536153637)

Motors are just as easy to use with the Crickit HAT for Raspberry Pi as other versions of Crickit.

![circuit_playground_Pi3-and-Crickit_HAT-Motors_bb.png](https://cdn-learn.adafruit.com/assets/assets/000/062/079/medium640/circuit_playground_Pi3-and-Crickit_HAT-Motors_bb.png?1537372525)

You can drive two separate DC motors, so lets go ahead and get right to it!

DC motors are controlled by 4 PWM output pins, the 4 PWM pins let you control speed _and_ direction. And we'll use our **adafruit\_motor** library to help us manage the throttle (speed) and direction for us, making it very easy to control motors

Note that each DC motor is a little different, so just because you have two at the same throttle does not mean they'll rotate at the _exact_ same speed! Some tweaking may be required

Info: 

```auto
import time
from adafruit_crickit import crickit

print("Dual motor demo!")

# make two variables for the motors to make code shorter to type
motor_1 = crickit.dc_motor_1
motor_2 = crickit.dc_motor_2

while True:
    motor_1.throttle = 1  # full speed forward
    motor_2.throttle = -1 # full speed backward
    time.sleep(1)

    motor_1.throttle = 0.5  # half speed forward
    motor_2.throttle = -0.5 # half speed backward
    time.sleep(1)

    motor_1.throttle = 0  # stopped
    motor_2.throttle = 0  # also stopped
    time.sleep(1)

    motor_1.throttle = -0.5  # half speed backward
    motor_2.throttle = 0.5   # half speed forward
    time.sleep(1)

    motor_1.throttle = -1  # full speed backward
    motor_2.throttle = 1   # full speed forward
    time.sleep(1)

    motor_1.throttle = 0  # stopped
    motor_2.throttle = 0  # also stopped
    time.sleep(0.5)
    
    # and repeat!
```

## Import Libraries

We start by importing the libraries that we need to have time delays ( `import time` ) and then the main crickit python library that will make it super easy to talk to the motors and sensors on crickit (`from adafruit_crickit import crickit`)

The `crickit` object represents the motors and servos available for control. The motors are available on the sub-objects named `dc_motor_1` and `dc_motor_2```

Each of these are [adafruit\_motor.motor](https://circuitpython.readthedocs.io/projects/motor/en/latest/api.html#) type objects for the curious

To make our code easier to read, we'll make new names for each motor:

```auto
# make two variables for the motors to make code shorter to type
motor_1 = crickit.dc_motor_1
motor_2 = crickit.dc_motor_2
```

## Control Motor

Now that we have our motor objects, we can simply assign the throttle, this will set the direction and speed. For example, to set the speed to full forward, use `motor_1.throttle = 1` and to set to full speed backward use `motor_1.throttle = -1`. For speeds in between, use a fraction, such as `0.5` (half speed) or `0.25` (quarter speed). Setting the `throttle = 0` will stop the motor.

# Introducing Adafruit Crickit #MakeRobotFriend

## CircuitPython Steppers

Connecting Crickit with Circuit Playground Express with stepper motors is shown at left.&nbsp;

![circuit_playground_dual_bb.png](https://cdn-learn.adafruit.com/assets/assets/000/057/244/medium640/circuit_playground_dual_bb.png?1536153752)

The Crickit with Feather uses identical connections with other Crickit boards to stepper motors.

&nbsp;

Note the Fritzing part for the blue stepper has changed wire order but the color connections shown are identical.

![circuit_playground_feather-dual-steppers_bb.png](https://cdn-learn.adafruit.com/assets/assets/000/060/933/medium640/circuit_playground_feather-dual-steppers_bb.png?1536153883)

Likewise you can drive two stepper motors with the Crickit HAT for Raspberry Pi. One on the Motor ports, one on the Drive ports.&nbsp;

&nbsp;

The coding for each port is a bit different but the functionality is the same.

&nbsp;

The Drive stepper must be Unipolar - bipolar steppers are not supported on the Drive port, only on the single Motor port.

![circuit_playground_Pi3-and-Crickit_HAT-Steppers_aa.png](https://cdn-learn.adafruit.com/assets/assets/000/062/081/medium640/circuit_playground_Pi3-and-Crickit_HAT-Steppers_aa.png?1537372684)

Even though we don't make it really obvious, you _can_ drive stepper motors from the Crickit.

Stepper motors rotate all the way around but only one 'step' at a time. Usually there's a few hundred steps per turn, making them great for precision motion. The trade off is they're very slow compared to servos or steppers. Also, unlike servos they don't know 'where' they are in the rotation, they can only step forward and backwards.

There's _two_ kinds of stepper motors: bipolar (4-wire) and unipolar (5 or 6-wire). We can control both kinds but with some restrictions!

- The voltage we use to power the motor is 5V only, so 5V power steppers are best, but sometimes you can drive 12V steppers at a slower/weaker rate
- You can drive **one** bi-polar stepper motor via the Motor port
- You can drive **two** uni-polar stepper motors, one via the Motor port and one via the Drive port
- That means you have have two uni-polar steppers or one uni and one bi-polar. But you cannot drive two bi-polar steppers.

# Bi-Polar or Uni-Polar Motor Port

The Crickit **Motor** port can run a unipolar (5-wire and 6-wire) or bipolar (4-wire) stepper. It cannot run steppers with any other # of wires!

**The code is the same for unipolar or bipolar motors, the wiring is just slightly different.**  
  
Unlike DC motors, the wire order **does** matter. Connect one coil to the Motor pair #1. Connect the other coil to the Motor pair #2

- If you have a bipolar motor, connect one motor coil to #1 and the other coil to #2 and do not connect to the center GND block.
- If you are using a unipolar motor with 5 wires, connect the common wire to the center GND port.
- If you are using a unipolar motor with 6 wires, you can connect the two 'center coil wires' together to the center GND port

[If you are using our "12V" bi-polar stepper,](https://www.adafruit.com/product/324) wire in this order: red, yellow, (skip GND center), green, gray

![circuit_playground_bipolarstepper_bb.png](https://cdn-learn.adafruit.com/assets/assets/000/055/245/medium640/circuit_playground_bipolarstepper_bb.png?1528576174)

[If you are using our 5V uni-polar stepper](https://www.adafruit.com/product/858), wire in this order: orange, pink, red (ground), yellow, blue.

![circuit_playground_unimotor_bb.png](https://cdn-learn.adafruit.com/assets/assets/000/057/247/medium640/circuit_playground_unimotor_bb.png?1531072140)

Here is the CircuitPython code for stepping various ways. You can try tweaking the `INTERSTEP_DELAY` to slow down the motor.

CircuitPython supports 4 different waveform stepping techniques. [More on each is detailed at Wikipedia.](https://en.wikipedia.org/wiki/Stepper_motor#Phase_current_waveforms)

- `SINGLE` stepping (one coil on at a time) - fast, lowest power usage, weak strength
- `DOUBLE` stepping (two coils on at a time) - fast, highest power, high strength
- `INTERLEAVE` stepping (alternates between one and two coils on) - slow (half the speed of single or double!), medium power, medium strength
- `MICROSTEPPING` - while this is supported its so slow with Crickit we're going to just 'skip' this one!

Unless you have power limiting requirements, DOUBLE is great for most projects. INTERLEAVE gives you smoother motion but is slower. SINGLE is simplest but weakest turning strength.

```auto
import time
from adafruit_crickit import crickit
from adafruit_motor import stepper

print("Bi-Polar or Uni-Polar Stepper motor demo!")

# make stepper motor a variable to make code shorter to type!
stepper_motor = crickit.stepper_motor
# increase to slow down, decrease to speed up!
INTERSTEP_DELAY = 0.01

while True:
    print("Single step")
    for i in range(200):
        stepper_motor.onestep(direction=stepper.FORWARD)
        time.sleep(INTERSTEP_DELAY)
    for i in range(200):
        stepper_motor.onestep(direction=stepper.BACKWARD)
        time.sleep(INTERSTEP_DELAY)

    print("Double step")
    for i in range(200):
        stepper_motor.onestep(direction=stepper.FORWARD, style=stepper.DOUBLE)
        time.sleep(INTERSTEP_DELAY)
    for i in range(200):
        stepper_motor.onestep(direction=stepper.BACKWARD, style=stepper.DOUBLE)
        time.sleep(INTERSTEP_DELAY)
    print("Interleave step")
    for i in range(200):
        stepper_motor.onestep(direction=stepper.FORWARD, style=stepper.INTERLEAVE)
        time.sleep(INTERSTEP_DELAY)
    for i in range(200):
        stepper_motor.onestep(direction=stepper.BACKWARD, style=stepper.INTERLEAVE)
        time.sleep(INTERSTEP_DELAY)
```

CircuitPython stepper motor control is pretty simple - you can access the motor port for stepper control via the `crickit.stepper_motor object` (it's an [adafruit\_motor.stepper type object](https://circuitpython.readthedocs.io/projects/motor/en/latest/api.html#adafruit-motor-stepper)).

With that object, you can call `onestep()` to step once, with the `direction` and stepping `style` included. The default direction is `FORWARD` and the default style is `SINGLE`.

Note that 'forward' and 'backward' are, like DC motors, dependent on your wiring and coil order so you can flip around the coil wiring if you want to change what direction 'forward' and 'backward' means.

Putting `time.sleep()`'s between steps will let you slow down the stepper motor, however most steppers are geared so you may not want any delays.

# Uni-Polar Only Drive Port

The Drive port can also control steppers although it can only do uni-polar! Don't try connecting a 4-wire bi-polar stepper, it won't work at all.

[If you are using our 5V uni-polar stepper](https://www.adafruit.com/product/858), wire in this order: red (5V), orange, yellow, pink, blue. That should line up with the wires on the plug

![circuit_playground_5_wire_stepper_drive_port.png](https://cdn-learn.adafruit.com/assets/assets/000/057/298/medium640/circuit_playground_5_wire_stepper_drive_port.png?1531149648)

And here's the CircuitPython code. Note that the only difference is we're using the&nbsp;`crickit.drive_stepper_motor` object now!

```auto
import time
from adafruit_crickit import crickit
from adafruit_motor import stepper

print("Uni-Polar Stepper motor demo!")

# make stepper motor a variable to make code shorter to type!
stepper_motor = crickit.drive_stepper_motor  # Use the drive port

# increase to slow down, decrease to speed up!
INTERSTEP_DELAY = 0.02
while True:
    print("Single step")
    for i in range(200):
        stepper_motor.onestep(direction=stepper.FORWARD)
        time.sleep(INTERSTEP_DELAY)
    for i in range(200):
        stepper_motor.onestep(direction=stepper.BACKWARD)
        time.sleep(INTERSTEP_DELAY)

    print("Double step")
    for i in range(200):
        stepper_motor.onestep(direction=stepper.FORWARD, style=stepper.DOUBLE)
        time.sleep(INTERSTEP_DELAY)
    for i in range(200):
        stepper_motor.onestep(direction=stepper.BACKWARD, style=stepper.DOUBLE)
        time.sleep(INTERSTEP_DELAY)
    print("Interleave step")
    for i in range(200):
        stepper_motor.onestep(direction=stepper.FORWARD, style=stepper.INTERLEAVE)
        time.sleep(INTERSTEP_DELAY)
    for i in range(200):
        stepper_motor.onestep(direction=stepper.BACKWARD, style=stepper.INTERLEAVE)
        time.sleep(INTERSTEP_DELAY)
```

# Introducing Adafruit Crickit #MakeRobotFriend

## CircuitPython Signals

Connecting various sensors, switches, and indicators is easy with Crickit.

The Crickit with Circuit Playground Express is shown at the left.

Note that external pull up (or pull down) resistors are needed on the Crickit Signals block as Seesaw does not have the capability to set internal pull up or pull down resistors like on direct microcontrollers.

![circuit_playground_allsign.png](https://cdn-learn.adafruit.com/assets/assets/000/075/510/medium640/circuit_playground_allsign.png?1557419577)

Connections to a Crickit with Feather board are identical.

Note that if you plan to use CircuitPython, the Feather board you choose should be one that is supported by CircuitPython (there are a few Feathers that cannot be programmed with CircuitPython).

![circuit_playground_feather-signals_bb.png](https://cdn-learn.adafruit.com/assets/assets/000/075/512/medium640/circuit_playground_feather-signals_bb.png?1557419628)

The Signals block on the Crickit HAT for Raspberry Pi gives you 8 bidirectional general purpose input/output (GPIO) (analog/digital) ports.

Since the Crickit HAT takes pins away from the Raspberry pi to control everything, the Signals block helps to provide some pins back and they all can accept analog input too (unlike RasPi pins).

![circuit_playground_Pi3-and-Crickit_HAT-Signals_bb.png](https://cdn-learn.adafruit.com/assets/assets/000/075/513/medium640/circuit_playground_Pi3-and-Crickit_HAT-Signals_bb.png?1557419666)

You may want to add buttons, LEDs, switches or simple sensors to your robot project. With Crickit, you get 8 x 'general purpose in/out' (GPIO) pins called **signals**. Each signal can be a digital input (button/switch), digital output (LED, for example), or _analog input._

This lets you add a ton of external components easily, and its all handled by seesaw. Perfect when you have a Feather without analog inputs (like the ESP8266) or just need a ton of extra pins.

The signal pins are on a 3x8 female header, so you can poke wires directly in!

Here's an example wiring that goes with the code below.

We have two switch buttons, connected to signals #1 and #2, the other side of the buttons connect to ground

There's also two LEDs, connected to the signals #3 and #4 and the negative wires connected to ground. (All the 3.3V and Ground pins are connected together so you don't _have_ to use the ones right next to the signal pin!)

![circuit_playground_one_one_one.png](https://cdn-learn.adafruit.com/assets/assets/000/125/571/medium640/circuit_playground_one_one_one.png?1698160615)

```auto
import time
from adafruit_crickit import crickit

# For signal control, we'll chat directly with seesaw, use 'ss' to shorted typing!
ss = crickit.seesaw

# Two buttons are pullups, connect to ground to activate
BUTTON_1 = crickit.SIGNAL1  # button #1 connected to signal port 1 & ground
BUTTON_2 = crickit.SIGNAL2  # button #2 connected to signal port 2 & ground

# Two LEDs are outputs, on by default
LED_1 = crickit.SIGNAL3    # LED #1 connected to signal port 3 & ground
LED_2 = crickit.SIGNAL4    # LED #2 connected to signal port 4 & ground

ss.pin_mode(LED_1, ss.OUTPUT)
ss.pin_mode(LED_2, ss.OUTPUT)
ss.pin_mode(BUTTON_1, ss.INPUT_PULLUP)
ss.pin_mode(BUTTON_2, ss.INPUT_PULLUP)
ss.digital_write(LED_1, True)
ss.digital_write(LED_2, True)

while True:
    if not ss.digital_read(BUTTON_1):
        print("Button 1 pressed")
        ss.digital_write(LED_1, True)
    else:
        ss.digital_write(LED_1, False)

    if not ss.digital_read(BUTTON_2):
        print("Button 2 pressed")
        ss.digital_write(LED_2, True)
    else:
        ss.digital_write(LED_2, False)
```

Each of the 8 signal pin numbers is available under the `crickit` object as `SIGNAL1` through `SIGNAL8`. **Note these are not DigitalInOut or Pin objects!** We need to use the `crickit.seesaw` object to set the mode, direction, and readings

To simplify our code we shorted the `crickit.seesaw` object to just `ss`

```auto
# For signal control, we'll chat directly with seesaw, use 'ss' to shorted typing!
ss = crickit.seesaw
```

# Digital Pin Modes

You can set the mode of each signal pin with `ss.pin_mode(signal, mode)` where `signal` is the `crickit.SIGNAL#` from above and _mode_ can be `ss.OUTPUT`, `ss.INPUT`&nbsp;or `ss.INPUT_PULLUP`.

```auto
ss.pin_mode(BUTTON_1, ss.INPUT_PULLUP)
ss.pin_mode(BUTTON_2, ss.INPUT_PullUP)
...
ss.pin_mode(LED_1, ss.OUTPUT)
ss.pin_mode(LED_2, ss.OUTPUT)
```

# Digital Read

Then, you can read the values True or False with `ss.digital_read(signal)`

Don't forget you have to set it to be an INPUT first! And if you don't have an external pull up resistor, you'll need to set it in the code.

```auto
ss.digital_read(BUTTON_1)
```

# Digital Write

Or, you can set the signal you want to a high value with `ss.digital_write(signal, True)`, or set to low value with `ss.digital_write(signal, False)`. Don't forget you have to set it to be an OUTPUT first!

```auto
# LED On
ss.digital_write(LED_2, True)
# LED Off
ss.digital_write(LED_2, False)
```

# Analog Reads
You can also read analog values like from a potentiometer or sensor.

&nbsp;

Let's do a demonstration where the center tap of a potentiometer is hooked up to **Signal #3** - don't forget to also connect one side of the potentiometer to 3.3V and the other side to ground.

![circuit_playground_signalpot_bb.png](https://cdn-learn.adafruit.com/assets/assets/000/057/257/medium640/circuit_playground_signalpot_bb.png?1531076293)

And here is the example code. You can see we read the signal with `ss.analog_read(signal)` which returns a value from 0 to 1023.

```auto
import time
from adafruit_crickit import crickit

# For signal control, we'll chat directly with seesaw, use 'ss' to shorted typing!
ss = crickit.seesaw
# potentiometer connected to signal #3
pot = crickit.SIGNAL3

while True:
    print((ss.analog_read(pot),))
    time.sleep(0.25)
```

By printing the value in a python tuple `(ss.analog_read(pot),)` we can use the Mu plotter to see the values immediately!

![](https://cdn-learn.adafruit.com/assets/assets/000/057/258/medium800/circuit_playground_plott.png?1531076857)

# Introducing Adafruit Crickit #MakeRobotFriend

## CircuitPython Touch

There's four capacitive touch pads you can use to detect human touch. They have big pads you can use to attach alligator/croc clips

![circuit_playground_captouchy_bb.png](https://cdn-learn.adafruit.com/assets/assets/000/057/270/medium640/circuit_playground_captouchy_bb.png?1531096608)

Whether you use a Circuit Playground Crickit or Feather Crickit, the touch pads are available.

![circuit_playground_feather-touch_bb.png](https://cdn-learn.adafruit.com/assets/assets/000/060/935/medium640/circuit_playground_feather-touch_bb.png?1536154586)

The four capacitive touch pads on the Crickit HAT for Raspberry pi are conveniently on the edge and vave nice holes for clipping alligator clips onto.

![circuit_playground_Pi3-and-Crickit_HAT-Touch_bb.png](https://cdn-learn.adafruit.com/assets/assets/000/062/089/medium640/circuit_playground_Pi3-and-Crickit_HAT-Touch_bb.png?1537373415)

You can read the value of the captouch pads from `crickit.touch_#.value` This will return `True` (if touched) or `False` (if not). This is the simplest/easiest way to detect touch, but it has a catch!

We determine if the touch is active by seeing the difference between the current 'raw' reading value and the first value. That means you do need to read the crickit touch pads _without_ touching them first.

Try loading this code and touching the four pads while looking at the REPL

```auto
import time
from adafruit_crickit import crickit

# Capacitive touch tests

while True:
    if crickit.touch_1.value:
        print("Touched Cap Touch Pad 1")
    if crickit.touch_2.value:
        print("Touched Cap Touch Pad 2")
    if crickit.touch_3.value:
        print("Touched Cap Touch Pad 3")
    if crickit.touch_4.value:
        print("Touched Cap Touch Pad 4")
```

If you want to get more specific, you can read the '`raw_value`' value which is a number between 0 and 1023. Because there's always&nbsp;_some_ capacitance its reading you'll see a starting value of about 250.

You can then test against a threshold, or use it to measure how hard someone is pressing against something (a fingertip vs a palm will give different readings)

```auto
import time
from adafruit_crickit import crickit

# Capacitive touch graphing test
touches = (crickit.touch_1, crickit.touch_2, crickit.touch_3, crickit.touch_4)

# Open up the serial Plotter in Mu to see the values graphed!

while True:
    touch_raw_values = (crickit.touch_1.raw_value, crickit.touch_2.raw_value,
                        crickit.touch_3.raw_value, crickit.touch_4.raw_value)
    print(touch_raw_values)
    time.sleep(0.1)
```

![](https://cdn-learn.adafruit.com/assets/assets/000/057/271/medium800/circuit_playground_touchplot.png?1531097303)

# Introducing Adafruit Crickit #MakeRobotFriend

## CircuitPython Audio

Amplified audio is available via the **Speaker** terminals.

&nbsp;

At left is the Circuit Playground Express and Crickit version.

![circuit_playground_speaker.png](https://cdn-learn.adafruit.com/assets/assets/000/054/071/medium640/circuit_playground_speaker.png?1536154675)

And this is the Feather and Crickit version.

&nbsp;

Be sure you order the correct Crickit board for the type of microcontroller you plan to use in your project. While the Crickits are nearly identical in capability, they are not the same in making connections to either Circuit Playground Express or Feather.

![circuit_playground_feather-speaker_bb.png](https://cdn-learn.adafruit.com/assets/assets/000/060/936/medium640/circuit_playground_feather-speaker_bb.png?1536154755)

The Speaker block on the Crickit HAT for Raspberry Pi is easily to use, on the edge of the board. The onboard amplifier is very handy to provide audio for various projects.

![circuit_playground_Pi3-and-Crickit_HAT-Speaker_aa.png](https://cdn-learn.adafruit.com/assets/assets/000/062/091/medium640/circuit_playground_Pi3-and-Crickit_HAT-Speaker_aa.png?1537373540)

Audio animatronics! By adding a voice or sound effects to your robot you can make a cool interactive project. We take advantage of CircuitPython's ability to play WAV files over the true-analog output pin **A0**.

This is one of the _few_ outputs that does not go through the seesaw chip. Instead, the audio is played directly from the CircuitPython board and the Crickit only amplifies it!

# Audio File Formats

CircuitPython supports **Mono&nbsp;** (not stereo) **22 KHz sample rate** (or less) and **16-bit** WAV format. The reason for mono is that there's only one output, 22 KHz or less because the Circuit Playground can't handle more data than that (and also it wont sound much better) and the DAC output is 10-bit so anything over 16-bit will just take up room without better quality

CircuitPython does not support OGG or MP3. Just WAV!

Since the WAV file must fit on the CircuitPython file system, it must be under 2 MB

[We have a detailed guide on how to generate WAV files here](../../../../adafruit-wave-shield-audio-shield-for-arduino/convert-files)

# Amplifier Details

The onboard amplifier is a mono "Class D" audio amp with BTL (Bridge Tied Load) output.

That means **you cannot plug the speaker output into another amplifier, it must connect directly to a speaker!**

You can use just about _any_ 4 to 8Ω speaker (6 Ω is OK too, just not as common). The amplifier can drive up to 3 Watts into 4Ω and 1 Watt into 8Ω. That means its ok to drive a 5 Watt speaker, it just wont be as loud as it _could_ be with a bigger amp (but you wont damage the amp). You can also drive speakers that are smaller, like an 8Ω 0.5 W but make sure you don't turn the audio volume potentiometer up, as it could damage the speaker by overpowering it.

Info: 

# Basic Audio Playback
```python
import audioio
import audiocore
import board
    
wavfile = "howto.wav"
f = open(wavfile, "rb")
wav = audiocore.WaveFile(f)
a = audioio.AudioOut(board.A0)
a.play(wav)

# You can now do all sorts of stuff here while the audio plays
# such as move servos, motors, read sensors...

# Or wait for the audio to finish playing:
while a.playing:
    pass
    
f.close()
```

Here is the audio file we're using for this example

[howto.wav](https://cdn-learn.adafruit.com/assets/assets/000/054/075/original/howto.wav?1526668791)
You must drag/copy this onto your **CIRCUITPY** disk drive, it's a big file so it will take a minute to copy over

## Import Libraries

We start by importing the libraries that we need to make audio output&nbsp; `import audioio` and `import audiocore` Then we `import``board`, our standard hardware library.

## Create wave file and audio output

Next we set the name of the file we want to open, which is a wave file `wavfile = "howto.wav"` and then open the file as a **r** eadable **b** inary and store the file object in **f** which is what we use to actually read audio from: `f = open(wavfile, "rb")`

Now we will ask the audio playback system to load the wave data from the file `wav = audiocore.WaveFile(f)` and finally request that the audio is played through the A0 analog output pin `a = audioio.AudioOut(board.A0)`

The audio file is now locked-and-loaded, and can be played at any time with `a.play(wav)`

Audio playback occurs in the background, using "DMA" (direct memory access) so you can control servos, motors, read sensors, whatever you like, while the DMA is happening. Since it happens asynchronously, you may want to figure out when its done playing. You can do that by checking the value of `a.playing` if it's `True` then its still processing audio, it will return `False` when complete.

# Interactive Audio

OK just playing an audio file is one thing, but maybe you want to have some interactivity, such as waiting for the person to touch something or press a button? Here's an example of using a time-delay and then pausing until something occurs:

```python
from busio import I2C
from adafruit_seesaw.seesaw import Seesaw
import audioio
import audiocore
import board
import time

# Create seesaw object
i2c = I2C(board.SCL, board.SDA)
seesaw = Seesaw(i2c)

# what counts as a 'touch'
CAPTOUCH_THRESH = 500

wavfile = "howto.wav"
f = open(wavfile, "rb")
wav = audiocore.WaveFile(f)
a = audioio.AudioOut(board.A0)
a.play(wav)

t = time.monotonic()  # this is the time when we started

# wait until we're at timecode 5.5 seconds into the audio
while time.monotonic() - t < 5.5:
    pass

a.pause()   # pause the audio

print("Waiting for Capacitive touch!")
while seesaw.touch_read(0) < CAPTOUCH_THRESH:
    pass

a.resume()   # resume the audio

# You can now do all sorts of stuff here while the audio plays
# such as move servos, motors, read sensors...

# Or wait for the audio to finish playing:
while a.playing:
    pass
print("Done!")
```

You may want to have the audio track match to motion or events in your robot. To do that you can do some tricks with `time.monotonic()`. That's our way of know true time passage, it returns a floating point (fractional) value in seconds. Note its hard to get the exact precise second so use `>` and `<` rather than checking for `=` equality because minute variations will make it hard to get the time delta exactly when it occurs.

# Introducing Adafruit Crickit #MakeRobotFriend

## CircuitPython NeoPixels

You can connect any type of NeoPixels to the NeoPixel port on the Crickit for Circuit Playground Express. Be sure you connect the Power and Ground connections appropriately.

&nbsp;

The center arrow terminal on Crickit NeoPixel block is connected to **Din** &nbsp;on the first NeoPixel or the beginning of a strip of NeoPixels.

![circuit_playground_CPX-Crickit-NeoPixels_aa.png](https://cdn-learn.adafruit.com/assets/assets/000/062/095/medium640/circuit_playground_CPX-Crickit-NeoPixels_aa.png?1537373936)

Likewise the Crickit Feather WIng has the same NeoPixel block.

&nbsp;

The board is just rotated a bit from the above picture, same location).

![circuit_playground_feather-neopixel_bb.png](https://cdn-learn.adafruit.com/assets/assets/000/062/096/medium640/circuit_playground_feather-neopixel_bb.png?1537374080)

The Crickit HAT for Raspberry Pi has the NeoPixel block along the edge for easy wiring.

![circuit_playground_Pi3-and-Crickit_HAT-NeoPixels_bb.png](https://cdn-learn.adafruit.com/assets/assets/000/062/099/medium640/circuit_playground_Pi3-and-Crickit_HAT-NeoPixels_bb.png?1537374185)

Using NeoPixels in your Crickit project is easy and fun, providing a dedicated port on the Crickit to directly wire NeoPixels easily.

The sample code for using NeoPixels on the Crickit vary slightly depending on which version of Crickit you have. Look for the appropriate section on this page for your combination of Crickit and microcontroller.

## NeoPixels with Circuit Playground Express + Crickit
Warning: 

The&nbsp; **NeoPixel** &nbsp;terminal block is controlled by the Circuit Playground Express pad A1. The pad A1 definition is obtained by&nbsp;`import board`. Then the NeoPixel routine is from&nbsp;`import neopixel`.

Various animations are provided by&nbsp;`def`ined functions&nbsp;`wheel`,&nbsp;`color_chase`&nbsp;and&nbsp;`rainbow_cycle`. Various solid colors are then defined, you are free to use whichever colors you wish.

You can define a new color variable as a Python tuple with three values for red, green, blue, for example&nbsp;`WHITE = (255, 255, 255)`.

https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/Crickits/Make_It_Glow_With_Crickit/Crickit-CPX-NeoPixels/code.py

## NeoPixels and the Crickit FeatherWing or Crickit Hat
The NeoPixel block signal wire is connected to the Crickit Seesaw control chip pin #20. The following code sets up an external 30 NeoPixel strip connected to the Crickit FeatherWing or HAT

On Raspberry Pi, you'll also need to add the library: from your command line run the following command:

`sudo pip3 install rpi_ws281x adafruit-circuitpython-neopixel`

https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/Crickits/Make_It_Glow_With_Crickit/Crickit-Feather-NeoPixels/code.py

## Crickit for micro:bit
Currently the micro:bit is not supported in CircuitPython. The micro:bit is programmable in MicroPython but there is no Crickit drive support for MicroPython at present.

## For More Information

See the tutorial [Make It Glow with Crickit](https://learn.adafruit.com/make-it-glow-with-crickit?view=all).

# Introducing Adafruit Crickit #MakeRobotFriend

## Python Docs

# Introducing Adafruit Crickit #MakeRobotFriend

## CircuitPython Examples

Need some...err...inspiration? Here's some example projects with CircuitPython code and wiring diagrams. They're not full-featured guides but they provide a good basis for seeing how to use Crickit!

Most of the examples use the Circuit Playground Express version of Crickit as that was the first Crickit released.

For CircuitPython based projects, the Feather Crickit should work fine as long as the project does not use Circuit Playground Express based hardware. There are a couple of differences noted in this guide for things like audio use.

Also you must choose a Feather that is compatible with CircuitPython.

For substituting one Crickit/microcontroller with another, we consider any changes should be for intermediate users - if you're a beginner, try to use the exact hardware specified for the best experience.

Warning: 

# Introducing Adafruit Crickit #MakeRobotFriend

## Bubble Bot

https://www.youtube.com/watch?v=Q4LMHV7ssq4

Its summer time and that means tank tops, ice cream and **bubbles!** This robot friend makes a bountiful burst of bubbles all on its own.

# Parts List
### 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 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)

### Standard servo - TowerPro SG-5010

[Standard servo - TowerPro SG-5010](https://www.adafruit.com/product/155)
This high-torque standard servo can rotate approximately 180 degrees (90 in each direction). You can use any servo code, hardware, or library to control these servos. Good for beginners who want to make stuff move without building a motor controller with feedback & gearbox. Comes with 3...

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

### DC Toy / Hobby Motor - 130 Size

[DC Toy / Hobby Motor - 130 Size](https://www.adafruit.com/product/711)
These are standard '130 size' DC hobby motors. They come with a wider operating range than most toy motors: from 4.5 to 9VDC instead of 1.5-4.5V. This range makes them perfect for controlling with an Adafruit Motor Shield, or with an Arduino where you are more likely to have 5 or 9V...

In Stock
[Buy Now](https://www.adafruit.com/product/711)
[Related Guides to the Product](https://learn.adafruit.com/products/711/guides)
![DC Toy Hobby Motor ](https://cdn-shop.adafruit.com/640x480/711-06.jpg)

# Wiring Diagram
![](https://cdn-learn.adafruit.com/assets/assets/000/055/269/medium800/circuit_playground_bubbz_bb.png?1528686810)

# Code

This simple robot doesn't do a lot but it does it very well!

We have one DC motor with a fan attachment, and one servo motor where we connect the bubble wand. Every few seconds, the wand goes down into the bubble mix, then back up, the fan turns on for 3 seconds, then turns off and the process repeats!

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

# Introducing Adafruit Crickit #MakeRobotFriend

## Feynman Simulator

https://www.youtube.com/watch?v=Evxe6T804RU

If you are a fan of physics wunderkind Richard Feynman _and_ you like bongo drums, this Feynman simulator will satisfy your every desire. [Between wise quips, this Feyn-bot will dazzle you with its drumming expertise](https://en.wikipedia.org/wiki/Richard_Feynman).

# Parts List
### 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 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)

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

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

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

# Wiring Diagram

Solenoids don't have 'direction' - any current will make them push. So even though we wired the black wire to 5V and the red wires to the #1 and #2 drive ports, they'll work just fine.

The microservo is taped to a wooden stick that moves the paper cut-out mouth up and down, [for a Monty-Python-style puppet](https://www.youtube.com/watch?v=D1BKtrG7qxQ).

![](https://cdn-learn.adafruit.com/assets/assets/000/055/271/medium800/circuit_playground_bongo_bb.png?1528688432)

# Code
Our code plays through a few wave file quips and quotes we found online, with some interstitial bongo drumming. Once all the audio has been played, it bongos for a long time, then repeats!

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

# Introducing Adafruit Crickit #MakeRobotFriend

## Slime Night

https://www.youtube.com/watch?v=mSn3j91k93c

Ladyada was unable to get to sleep. Feeling restless she decided to visit her workshop and make some slime to help soothe her soul. Then her companion showed up to lend a hand and have fun together!

# How to Make Slime

- **1 Bottle Elmers Glue** - we like the glitter glue but you can use plain white glue and add food coloring!
- **1/2 Tablespoon Baking Soda** - not baking powder! You probably have some in your freezer, fridge, or baking cabinet
- **1 Tablespoon Contact Lens Solution** - make sure to get the stuff with **Boric Acid!**

Put glue in a glass container, add soda and solution, mix & enjoy!

The quantities are flexible and you don't have to be exact. Add a little more or less to change gooeyness.

# Parts Used
### 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)

### 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)
![DC Gearbox Motor - TT Motor with two long wires and yellow body](https://cdn-shop.adafruit.com/640x480/3777-00.jpg)

### 3.5mm (1/8") Stereo Audio Jack Terminal Block

[3.5mm (1/8") Stereo Audio Jack Terminal Block](https://www.adafruit.com/product/2791)
One truth about working with audio is you always need the cable or adapter you _don't_ have in your toolbox. That's why we love these terminal-block audio connectors so much. **No soldering required!** Use stranded or solid core wire and a small screw driver to...

In Stock
[Buy Now](https://www.adafruit.com/product/2791)
[Related Guides to the Product](https://learn.adafruit.com/products/2791/guides)
![3.5mm (1/8) Stereo Audio Jack Terminal Block](https://cdn-shop.adafruit.com/640x480/2791-01.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 Dots Strand - 20 LEDs at 2" Pitch

[Adafruit NeoPixel LED Dots Strand - 20 LEDs at 2" Pitch](https://www.adafruit.com/product/3630)
Attaching NeoPixel strips to your costume can be a struggle as the flexible PCBs can crack when bent too much. So how to add little dots of color? Use these stranded NeoPixel dots! They're very small, so they're easy to embed into any structure, costume, or wearable. Each dot is...

In Stock
[Buy Now](https://www.adafruit.com/product/3630)
[Related Guides to the Product](https://learn.adafruit.com/products/3630/guides)
![Adafruit NeoPixel LED Dots Strand - 20 LEDs at 2 inch Pitch](https://cdn-shop.adafruit.com/640x480/3630-02.jpg)

# Wiring Diagram
![](https://cdn-learn.adafruit.com/assets/assets/000/054/247/medium800/circuit_playground_ghosty_bb.png?1526956554)

# CircuitPython Code

This project has a foot pedal potentiometer that controls the speed of the TT motor that spins the platter around. Since foot pedals are rheostats (variable resistors) you need another resistor to finish the divider. We use a plain 10K, any value from about 4.7K to 47K will do fine.

When not pressed, the analog reading value is about 700. When pressed, the reading goes down to about 50. You may need to calibrate these numbers for your foot pedal!

We map the analog press values to motor speed, our max speed we want is 0.5 throttle (1.0 was waaay to fast) using our simple mapper helper. If its our first time pressing the pedal, we play the audio file 3 seconds later, to give some ambience.

You can also press the **A** button to turn on/off some pretty NeoPixels.

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

# Introducing Adafruit Crickit #MakeRobotFriend

## Flying Trapeze

https://youtu.be/zpqr9nGbG9o

Feel the excitement, the thrill, the rushing air beneath your wings - without having to leave home or run any risk of injury or sweating!

This Flying Trapeze bot uses a servo claw to grip onto a willing gymnast, and release it into the air when the detected acceleration has reached a sufficient peak!

# Parts List
The servo claw we used had a built in metal gear servo that could draw significant current when actuated! We found a 4xAA battery pack with good NiMH batteries would last a while but 3xNiMH couldn't power it sufficiently

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

### 4 x AA Battery Holder with On/Off Switch

[4 x AA Battery Holder with On/Off Switch](https://www.adafruit.com/product/830)
Make a nice portable power pack with this 4 x AA battery holder. It fits any alkaline or rechargeable AA batteries in series. There's a snap on cover and an on/off switch which can be handy when wiring to something without a switch.

**New**! We now have 0.1" headers...

In Stock
[Buy Now](https://www.adafruit.com/product/830)
[Related Guides to the Product](https://learn.adafruit.com/products/830/guides)
![Angled shot of square black 4 x AA battery holder with on/off switch and male jumper wires.](https://cdn-shop.adafruit.com/640x480/830-07.jpg)

### Male DC Power adapter - 2.1mm plug to screw terminal block

[Male DC Power adapter - 2.1mm plug to screw terminal block](https://www.adafruit.com/product/369)
If you need to connect a battery pack or wired power supply to a board that has a DC jack - this adapter will come in very handy! There is a 2.1mm DC plug on one end, and a screw terminal block on the other. The terminals are labeled with positive/negative assuming a positive-tip configuration...

In Stock
[Buy Now](https://www.adafruit.com/product/369)
[Related Guides to the Product](https://learn.adafruit.com/products/369/guides)
![Angled shot of a Male DC Power adapter - 2.1mm plug ](https://cdn-shop.adafruit.com/640x480/369-03.jpg)

# Wiring
![](https://cdn-learn.adafruit.com/assets/assets/000/054/278/medium800/circuit_playground_trapeze_bb.png?1527048488)

# Boot.py

Since we want to have the ability to data log the accelerometer, we need to put the CPX into 'filesystem write mode' - this boot.py will let you use the switch on the CPX to select whether you want to log data or go into trapeze-release mode

https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/Crickits/flying_trapeze/boot.py

# CircuitPython Code

Our Python code is dual use. You can use the slide switch to select whether you want to log the accelerometer data to the onboard storage. If you do, its easy to plot it and see the magnitude of the forces on your trapeze artist!

We mostly used data log mode to calibrate how 'hard' we required the person to push the trapeze to make the servo release the gymnast-stand-in.

We also have two buttons on the CPX we use for different tasks. In logging mode, you use button **A** to turn on/off logging. The red LED blinks to let you know logging is occuring. In trapeze mode, **A** and **B** let you manually open/close the servo gripper so you can have it grab the gymnasts head. Hey life's tough all around!

Finally, if we're in trapeze mode, we look for when we're at the beginning of a swing, that's when the Z axis acceleration drops below 3 m/s<sup>2</sup> and the Y axis has positive acceleration (we used the data log info to figure this out!) If so, the next time we reach max-acceleration, at the lowest point of the swing, we start opening the gripper, which takes a little time so that when we are at the end of the swing, it's opened enough for the gymnast to be released!

We change the NeoPixel colors to help debug, by flashing when we reach the different sensor states, since we don't have wireless data transfer on the CPX.

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

For the curious, [our data log file is here!](https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/master/Crickits/flying_trapeze/log.csv)

# Introducing Adafruit Crickit #MakeRobotFriend

## R.O.B. GyroBot

https://youtu.be/ffAuebA5WAo

We picked up a Nintendo R.O.B. robot from our local online auction site and when it appeared we decided to figure out how to get it working. There's 3 motors inside, and the R.O.B. already comes with motor drivers and end-stops, so instead of driving the robot directly, we decided to control the R.O.B. using Circuit Playground Express (CPX) and Crickit!

The code is all in CircuitPython.

We use the Crickit for the amplified audio effects (we snagged some audio from gameplay to give it that authentic chiptune sound), driving an IR LED for signalling at 500mA burst current so we could have it a few feet away, and the capacitive touch inputs for our desk controller.

With the addition of a D battery for the gyro turner, we had a fun live-action game without the need of a CRT!

# Parts List
### 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 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)

### Super-bright 5mm IR LED

[Super-bright 5mm IR LED](https://www.adafruit.com/product/387)
Infrared LEDs are used for remote controls (they're the little LED in the part you point at your TV) and 'night-vision' cameras, and these little blue guys are high powered ones! They are 940nm wavelength, which is what nearly all devices listen to. They're 20 degree beamwidth,...

Out of Stock
[Buy Now](https://www.adafruit.com/product/387)
[Related Guides to the Product](https://learn.adafruit.com/products/387/guides)
![Unlit blue-tinted LED](https://cdn-shop.adafruit.com/640x480/387-01.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)

# Wiring Diagram

The IR LED can handle up to 1 Amp peak current, so don't use a resistor, just wire it up to Drive 1 directly!

We use 4 capacitive touch sensors from the Crickit and 2 from CPX for 6 total (there's more capacitive touch inputs available on Crickit Signal pins but we wanted to use plain alligator pads!)

![](https://cdn-learn.adafruit.com/assets/assets/000/054/452/medium800/circuit_playground_rob_bb.png?1527216161)

# Code!

Save to your CPX as **code.py** and touch the alligator clips to control your R.O.B.

The IR LED should be 1-2 feet away and pointed at the R.O.B's left eye (or, the right-most eye when you are looking at R.O.B)

It will calibrate when first starting up, and play some tunes.

Flip the switch on/off on the CPX to turn on/off the capacitive touch detection/command sending (if you need to adjust your cables without having the robot turn around on you!

To help you know what's going on, the NeoPixels on the CPX will glow to match the colors of the alligator clips shown above, so use those same colors! Only exception is black shows up as purple LEDs.

You may need to tweak the capacitive touch threshholds. Try uncommenting

` #touch_vals = (touch2.raw_value, touch3.raw_value, seesaw.touch_read(0), seesaw.touch_read(1), seesaw.touch_read(2), seesaw.touch_read(3))`  
` #print(touch_vals)`

And watching the REPL to see what the values read are.

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

# Introducing Adafruit Crickit #MakeRobotFriend

## Gear Tower

Plastic toys are great for hacking, modding and improving using Crickit! This box o' gears is fun for about 10 minutes...but when you add motors, sensors and robotics you can make cool interactive art

This example shows how to use the light sensor on the Circuit Playground Express to trigger a motor to rotate. With some audio effects it becomes a Force trainer, or a moving Theremin

# Parts List
### 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)

### 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)
![DC Gearbox Motor - TT Motor with two long wires and yellow body](https://cdn-shop.adafruit.com/640x480/3777-00.jpg)

### TT Motor Pulley - 36mm Diameter

[TT Motor Pulley - 36mm Diameter](https://www.adafruit.com/product/3789)
Mechanical transmission for the win, this simple plastic pulley can attach to your TT motor to transmit rotation from the motor axle&nbsp;to...somewhere else.

This is a very useful part when you require more than wheels for your robotics project. A belt and pulley solution can be...

In Stock
[Buy Now](https://www.adafruit.com/product/3789)
[Related Guides to the Product](https://learn.adafruit.com/products/3789/guides)
![TT Motor Pulley installed on DC motor](https://cdn-shop.adafruit.com/640x480/3789-03.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)

# Wiring
![](https://cdn-learn.adafruit.com/assets/assets/000/054/508/medium800/circuit_playground_geartower_bb.png?1527474147)

# CircuitPython Code For "Force Wave" demo

This project is pretty simple, it looks to see when the light sensor is shaded by your hand and changes the motor from running to off or vice versa.

https://youtu.be/z_C2dkLVfIY

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

# CircuitPython Code For "Theremin" demo

We can adapt the code above to speed up or slow down the motor based on how far our hand is. The darker the sensor, the faster the motor spins!

https://youtu.be/ylSy1CBUoWw

https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/Crickits/gear_tower/light-sensor-tower/code.py

# Introducing Adafruit Crickit #MakeRobotFriend

## CPX-1701

https://youtu.be/oOE2Ht-J2Jc

> This is the adventure of the United Space Ship _CircuitPlayground_. Assigned a five year galaxy patrol, the bold crew of the giant starship explores the excitement of strange new worlds, uncharted civilizations, and exotic code. These are its voyages and its adventures.

Explore exciting new modes of propulsion by creating a _really big_ vibrating motor. This Crickit project attaches a bunch of CD's to an up-cycled CD-ROM motor for a cool looking warp drive. Some popsicle sticks, NeoPixels and sound effects complete the space craft and it's now ready for your command, captain!

# Parts List
### 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 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)

### Thin Plastic Speaker w/Wires - 8 ohm 0.25W

[Thin Plastic Speaker w/Wires - 8 ohm 0.25W](https://www.adafruit.com/product/1891)
Listen up! This 1.5" diameter speaker cone is the perfect addition to any audio project where you need an 8Ω impedance and are using 0.25W of power. The speakers are rated at 0.25W, with a maximum input of 0.5W (printed wattage on back of speaker may have either value).

We...

In Stock
[Buy Now](https://www.adafruit.com/product/1891)
[Related Guides to the Product](https://learn.adafruit.com/products/1891/guides)
![Angled Shot of the Thin Plastic Speaker w/Wires - 8 ohm 0.25W](https://cdn-shop.adafruit.com/640x480/1891-05.jpg)

# Wiring Diagram

&nbsp;

![](https://cdn-learn.adafruit.com/assets/assets/000/055/077/medium800/circuit_playground_geartower_bb.png?1528245287)

# CircuitPython Code

This project is pretty simple, it plays some audio clips, and then lights up the built in NeoPixels and powers up the motor in time with the effects.

https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/Crickits/cpx-1701/code.py

# Introducing Adafruit Crickit #MakeRobotFriend

## Mag Neat-o

https://www.youtube.com/watch?v=enOB2HwDKwM

We picked up a magnetic foam shape kit, to make a fridge-mounted marble run. But picking up the marble after each run is such a _drag_ - wouldn't it be fun if you could use your Crickit to help lift the ball back up and re-start the marble run?

With an electromagnet, we can pick up the stainless steel balls. A DC motor acts as a pulley, and a servo helps align the electromagnet so it can navigate around the foam.

You can DIY, as we did, using the two Circuit Playground Express buttons and switch to control the motors - or you could even automate the whole thing!

# Parts List
### 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 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)

### 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)
![DC Gearbox Motor - TT Motor with two long wires and yellow body](https://cdn-shop.adafruit.com/640x480/3777-00.jpg)

### Standard servo - TowerPro SG-5010

[Standard servo - TowerPro SG-5010](https://www.adafruit.com/product/155)
This high-torque standard servo can rotate approximately 180 degrees (90 in each direction). You can use any servo code, hardware, or library to control these servos. Good for beginners who want to make stuff move without building a motor controller with feedback & gearbox. Comes with 3...

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

### Part: 5V Electromagnet
quantity: 1
Use a "50N" one for good pick up ability!

# Wiring Diagram

Even though an electromagnet doesn't have 'direction' and thus could be controlled by a Drive pin, we opted for a Motor port because these electromagnets can draw up to 700mA and that's more than the Drive pin. But, you could almost certainly get away with using a Drive pin if you like!

![](https://cdn-learn.adafruit.com/assets/assets/000/055/262/medium800/circuit_playground_magneato_bb.png?1528667937)

# Code!

Save to your CPX as **code.py** and press the CPX buttons to move the pulley up and down. Capacitive touch pads #1 and #4 twist the servo and then the switch enables and disables the electromagnet.

The most interesting part is `smooth_move` which is our gentle servo movement helper, it will carefully move the servo rather than jostling it and the magnet which would possibly cause the balls to fall.

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

# Introducing Adafruit Crickit #MakeRobotFriend

## (Don't Fear) The Crickit

https://youtu.be/sjisA9-YyrM

# Parts List
### 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)

### Panel Mount Right Angle 10K Linear Potentiometer w/On-Off Switch

[Panel Mount Right Angle 10K Linear Potentiometer w/On-Off Switch](https://www.adafruit.com/product/3395)
This **Panel Mount Right Angle 10K Linear Potentiometer w/ On-Off Switch** is a two-in-one, with both a breadboard-friendly potentiometer _and_ a switch. For the potentiometer-half, you've got a standard linear taper 10K ohm potentiometer, with a grippy shaft. It's...

Out of Stock
[Buy Now](https://www.adafruit.com/product/3395)
[Related Guides to the Product](https://learn.adafruit.com/products/3395/guides)
![Panel Mount Right Angle 10K Linear Potentiometer with On-Off Switch](https://cdn-shop.adafruit.com/640x480/3395-01.jpg)

### Solid Machined Metal Knob - 1" Diameter

[Solid Machined Metal Knob - 1" Diameter](https://www.adafruit.com/product/2056)
This is really the fanciest, best-feeling knob we've ever seen. Using this knob sort of reminded us of driving along&nbsp;the Amalfi coast in a perfectly restored '65 Porsche -&nbsp;meaning we really, really liked it. &nbsp;We hand-selected the best knobs for your project in different...

In Stock
[Buy Now](https://www.adafruit.com/product/2056)
[Related Guides to the Product](https://learn.adafruit.com/products/2056/guides)
![Solid Machined Metal potentiometer or encoder Knob with rubber grip](https://cdn-shop.adafruit.com/640x480/2056-01.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 Dots Strand - 20 LED 4" Pitch

[Adafruit NeoPixel LED Dots Strand - 20 LED 4" Pitch](https://www.adafruit.com/product/3631)
Attaching NeoPixel strips to your costume can be a struggle as the flexible PCBs can crack when bent too much. So how to add little dots of color? Use these stranded NeoPixel dots! They're very small, so they're easy to embed into any structure, costume, or wearable. Each dot is...

In Stock
[Buy Now](https://www.adafruit.com/product/3631)
[Related Guides to the Product](https://learn.adafruit.com/products/3631/guides)
![Adafruit NeoPixel LED Dots Strand - 20 LEDs at 4 inch Pitch](https://cdn-shop.adafruit.com/640x480/3631-04.jpg)

### Part: Fog Machine with Remote
quantity: 1
https://www.amazon.com/Virhuck-400-Watt-Portable-Halloween-Christmas/dp/B074WMWWS5

### Part: Cow Bell
quantity: 1
Craft store cowbell

# Wiring Diagram
![](https://cdn-learn.adafruit.com/assets/assets/000/055/367/medium800/circuit_playground_dont_fear_the_crickit_bb.png?1528766931)

For the remote, we soldered four wires

- Black ground wire to the battery spring (negative) terminal
- Red +5V wire to the battery flat (positive) terminal
- White and Purple go to the 'switched' part of each switch, which, when connected to 5V activates that switch

![circuit_playground_IMG_1002.jpg](https://cdn-learn.adafruit.com/assets/assets/000/055/368/medium640/circuit_playground_IMG_1002.jpg?1528767215)

# CircuitPython Code
https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/Crickits/dont_fear_the_crickit/code.py

# Introducing Adafruit Crickit #MakeRobotFriend

## Arduino Code

Info: 

The microcontrollers installed on top of Crickit communicate to execute Crickit commands via the seesaw chip located on the Crickit. Seesaw is a helper microcontroller which talks to the main microcontroller via the serial I2C protocol. There is a bit of setup to get things working in your Arduino code but it is not difficult.

# Download Adafruit\_Seesaw library

To begin using your Crickit with the Arduino IDE, you will need to install the [Adafruit\_seesaw library](https://github.com/adafruit/Adafruit_Seesaw/).

Start up the IDE and open the Library Manager:

![](https://cdn-learn.adafruit.com/assets/assets/000/054/274/medium800/circuit_playground_libmanager.png?1527021329)

Type in **seesaw** until you see the Adafruit Library pop up. Click **Install**!

![](https://cdn-learn.adafruit.com/assets/assets/000/054/275/medium800/circuit_playground_seesawlib.png?1527021633)

We also have a great tutorial on Arduino library installation at:  
[http://learn.adafruit.com/adafruit-all-about-arduino-libraries-install-use](http://learn.adafruit.com/adafruit-all-about-arduino-libraries-install-use)

## Arduino with micro:bit

For basic usage of Arduino with the micro:bit, [see this tutorial to get started](https://learn.adafruit.com/use-micro-bit-with-arduino/overview).&nbsp;

Once you have the basic support down, you can use an attached Crickit via the Seesaw library.

Warning: 

## Pin Definitions for Seesaw and Crickit

There are two files you should include in your sketches, `Adafruit_seesaw.h` and `Adafruit_Crickit.h`. Pin definitions for controlling Crickit functions are in `Adafruit_Crickit.h` for reference.

https://github.com/adafruit/Adafruit_Seesaw/blob/master/Adafruit_Crickit.h

# Introducing Adafruit Crickit #MakeRobotFriend

## Arduino Servos

The location of the Servo connections on Crickit are similar on all three versions of the board: Circuit Playground Express, Feather, and micro:bit.

![circuit_playground_servos_bb.png](https://cdn-learn.adafruit.com/assets/assets/000/054/252/medium640/circuit_playground_servos_bb.png?1537277832)

![circuit_playground_feather-servos_bb.png](https://cdn-learn.adafruit.com/assets/assets/000/062/015/medium640/circuit_playground_feather-servos_bb.png?1537277861)

![circuit_playground_microbit-servos_bb.png](https://cdn-learn.adafruit.com/assets/assets/000/062/016/medium640/circuit_playground_microbit-servos_bb.png?1537277881)

![circuit_playground_Pi3-and-Crickit_HAT-Servos_bb.png](https://cdn-learn.adafruit.com/assets/assets/000/062/100/medium640/circuit_playground_Pi3-and-Crickit_HAT-Servos_bb.png?1537374263)

# Test Servos

Lets start by controlling some servos. You'll want at least one servo to plug in and test out the servo code. [Visit our recommended servo page to check that you have a servo that works](../../../../cpx-crickit/recommended-servos). Once you do, plug in a servo into **SERVO #1** spot, making sure the yellow or white wire is next to the **1** text label.

This example will show rotating one servo from 0 to 180 degrees with a stop at 90 degrees.

https://github.com/adafruit/Adafruit_Seesaw/blob/master/examples/Crickit/servo/test_servo/test_servo.ino

Warning: 

# More Servos!

OK that was fun but you want MORE servos right? You can control up to four! The servos are on the seesaw pins **17 (CIRCKIT\_SERVO1)**, **16&nbsp;(CIRCKIT\_SERVO2)**, **15&nbsp;(CIRCKIT\_SERVO3)**, **14&nbsp;(CIRCKIT\_SERVO4)**

This example is similar to the 1 servo example, but instead of creating one `myservo` object, we'll make an array&nbsp;called `servos` that contains 4 servo objects. Then we can assign them using `servo[0].write(90);` or iterate through them as we do in the loop. You don't _have_ to do it this way, but its very compact and doesn't take a lot of code lines to create all 4 servos at once!

https://github.com/adafruit/Adafruit_Seesaw/blob/master/examples/Crickit/servo/more_servos/more_servos.ino

# Min/Max Pulse control

In theory, servos should all use 1ms to 2ms long pulses, at 50 Hz to set the 0 and 180 degree locations. However, not all servos have their full range at those pulse widths. You can easily tweak your code to change the min and max pulse widths, which will let your servo turn more left and right. **But** don't set the widths too small/large or you can hit the hard stops of the servo which could damage it, so try tweaking the numbers slowly until you get a sense of what the limits are for your motor.

All you need to do is change the

`myservo.attach(CRICKIT_SERVO1);`

to, say,

`myservo.attach(CRICKIT_SERVO1, 750, 2250);`

Here we've change the minimum pulse from the default 1000 microseconds to 750, and the default maximum pulse from 2000 microseconds to 2250. Again, each servo differs. Some experimentation may be required!

# Continuous Rotation Servos

If you're using continuous servos, you can use the angle assignments and just remember that 0 is rotating one way, 90 is 'stopped' and 180 and rotating the other way.

If your continuous servo doesn't stop once the script is finished you may need to tune the `min` and `max`&nbsp;pulse timings so that the center makes the servo stop. Or check if the servo has a center-adjustment screw you can tweak.

# Disconnecting Servos or Custom Pulses

If you want to 'disconnect' the Servo by sending it 0-length pulses, you can do that by 'reaching in' and adjusting the underlying PWM duty cycle with:

`myservo.writeMicroseconds(0);`

Likewise you can set the duty cycle to a custom value with

`myservo.writeMicroseconds(number);`

where&nbsp;`number`&nbsp;is the pulse length is microseconds between 0 (off) and 20000 (fully on). For example, setting it to 10000 will be 50% duty cycle, at the 50 Hz update rate

# Introducing Adafruit Crickit #MakeRobotFriend

## Arduino Drives

The Drives port provides the ability to drive higher current devices.

&nbsp;

The functionality is identical on all versions of Crickit shown at left.

![circuit_playground_drives_bb.png](https://cdn-learn.adafruit.com/assets/assets/000/054/253/medium640/circuit_playground_drives_bb.png?1537278872)

![circuit_playground_feather-drives_bb.png](https://cdn-learn.adafruit.com/assets/assets/000/062/017/medium640/circuit_playground_feather-drives_bb.png?1537278892)

![circuit_playground_microbit-drives_bb.png](https://cdn-learn.adafruit.com/assets/assets/000/062/018/medium640/circuit_playground_microbit-drives_bb.png?1537278910)

![circuit_playground_Pi3-and-Crickit_HAT-Drives_bb.png](https://cdn-learn.adafruit.com/assets/assets/000/062/101/medium640/circuit_playground_Pi3-and-Crickit_HAT-Drives_bb.png?1537374297)

# Test Drive

Lets start by controlling a drive output. You'll need to plug something into the **5V** and **DRIVE1** terminal blocks. I'm just using a simple LED with resistor but anything that can be powered by 5V will work.

- Note that the drive outputs cannot have 5V output so you must connect the **positive** pin of whatever you're driving to **5V**. Don't try connecting the positive pin to the drive, and the negative pin to **GND** , it wont work!
- Drive outputs are PWM-able!
- PWM values can be anywhere between **0** (0% duty cycle or always off) and **65535** (100% duty cycle or always on). A value of **32768** would be 50% duty cycle, or on for half of the period and then off for half the period.

This example will show turning the drive output fully on and off once a second. The macros CRICKIT\_DUTY\_CYCLE\_OFF and CRICKIT\_DUTY\_CYCLE\_MAX correspond to 0 and 65535 respectively and are used for readability:

https://github.com/adafruit/Adafruit_Seesaw/blob/master/examples/Crickit/drive/test_drive/test_drive.ino

# More Drivers!

OK that was fun but you want MORE drives right? You can control up to four! The four drive outputs are on the seesaw pins **13 (CRICKIT\_DRIVE1)**, **12 (CRICKIT\_DRIVE2)**, **43&nbsp;(CRICKIT\_DRIVE3)**, **42&nbsp;(CRICKIT\_DRIVE4)**

https://github.com/adafruit/Adafruit_Seesaw/blob/master/examples/Crickit/drive/more_drivers/more_drivers.ino

This example is similar to the 1 drive example, but instead of using just 1 PWM driver, we'll make an array&nbsp;called `drives` that contains the pin numbers of 4 PWM drivers. Then we can assign them using `crickit.analogWrite(drives[0], CRICKIT_DUTY_CYCLE_MAX);`&nbsp;or iterate through them as we do in the loop. You don't _have_ to do it this way, but its very compact and doesn't take a lot of code lines to create all 4 drivers at once!

# Introducing Adafruit Crickit #MakeRobotFriend

## Arduino DC Motors

The hexagonal Crickets at left all have a similar Motor port which can drive two DC motors.&nbsp;

![circuit_playground_dcmotors_bb.png](https://cdn-learn.adafruit.com/assets/assets/000/054/263/medium640/circuit_playground_dcmotors_bb.png?1537279236)

![circuit_playground_feather-dcmotors_bb.png](https://cdn-learn.adafruit.com/assets/assets/000/062/019/medium640/circuit_playground_feather-dcmotors_bb.png?1537279258)

![circuit_playground_microbit-dcmotors_bb.png](https://cdn-learn.adafruit.com/assets/assets/000/062/020/medium640/circuit_playground_microbit-dcmotors_bb.png?1537279275)

![circuit_playground_Pi3-and-Crickit_HAT-Motors_bb.png](https://cdn-learn.adafruit.com/assets/assets/000/062/102/medium640/circuit_playground_Pi3-and-Crickit_HAT-Motors_bb.png?1537374337)

DC motors are controlled by 4 PWM output pins, the 4 PWM pins let you control speed _and_ direction. And we'll use our **seesaw\_Motor&nbsp;** library to help us manage the throttle (speed) and direction for us, making it very easy to control motors

Note that each DC motor is a little different, so just because you have two at the same throttle does not mean they'll rotate at the _exact_ same speed! Some tweaking may be required

Info: 

https://github.com/adafruit/Adafruit_Seesaw/blob/master/examples/Crickit/motor/dual_motor/dual_motor.ino

# Introducing Adafruit Crickit #MakeRobotFriend

## Arduino Signals

The 8 GPIO pins on the Crickit are in the Signals block of pins. You have the 8 data pins, each input/output, 3.3v logic, analog or digital.

These GPIO are controlled by the Crickit's seesaw chip, not directly by the microcontroller or the Raspberry Pi. Thus programming them takes a bit more work but they provide some great benefits.

![circuit_playground_feather-signals_bb.png](https://cdn-learn.adafruit.com/assets/assets/000/075/503/medium640/circuit_playground_feather-signals_bb.png?1557418963)

![circuit_playground_Pi3-and-Crickit_HAT-Signals_bb.png](https://cdn-learn.adafruit.com/assets/assets/000/075/504/medium640/circuit_playground_Pi3-and-Crickit_HAT-Signals_bb.png?1557418986)

![circuit_playground_microbit-signals_bb.png](https://cdn-learn.adafruit.com/assets/assets/000/075/507/medium640/circuit_playground_microbit-signals_bb.png?1557419086)

Signals on the Crickit are available on the following pins:

You can use these as analog or digital I/O pins, setting the mode, value and reading with the seesaw library directly:

https://github.com/adafruit/Adafruit_Seesaw/blob/master/examples/Crickit/signal/test_signal/test_signal.ino

# Introducing Adafruit Crickit #MakeRobotFriend

## Arduino Capacitive Touch

Capacitive touch capability is in two places:

&nbsp;

On the four alligator clip friendly pads on the Capacitive Touch area on Crickit.

![circuit_playground_captouchy_bb.png](https://cdn-learn.adafruit.com/assets/assets/000/062/021/medium640/circuit_playground_captouchy_bb.png?1537279800)

![circuit_playground_feather-touch_bb.png](https://cdn-learn.adafruit.com/assets/assets/000/062/022/medium640/circuit_playground_feather-touch_bb.png?1537279821)

![circuit_playground_microbit-touch_bb.png](https://cdn-learn.adafruit.com/assets/assets/000/062/023/medium640/circuit_playground_microbit-touch_bb.png?1537279842)

Capacitive touch is very useful for activating things in your projects.

The following code demonstrates the features of the Crickit cap touch pads.

https://github.com/adafruit/Adafruit_Seesaw/blob/master/examples/Crickit/cap_touch_demo/cap_touch_demo.ino

# Introducing Adafruit Crickit #MakeRobotFriend

## Arduino NeoPixels

Crickit makes it really easy to add NeoPixels (WS2812/WS2811/SK6812 chipsets) to your project. The Crickit has a 3-terminal block connector with&nbsp; **Ground** ,&nbsp; **Signal&nbsp;** and&nbsp; **5V** &nbsp;power. The signal line has a level shifter on it so it will be 5V logic level, for nice clean signals.

This output is slightly different depending on what kind of Crickit you have.

## Crickit for Circuit Playground Express
If you have a **&nbsp;Circuit Playground Crickit** &nbsp;then the NeoPixels are driven by the Circuit Playground&nbsp; **A1&nbsp;** pad by default.&nbsp;

&nbsp;

[Use the Adafruit\_NeoPixel library](https://github.com/adafruit/Adafruit_NeoPixel)&nbsp;to control NeoPixels connected to Crickit through Circuit Playground Express pin A1.

&nbsp;

However, if you want, you can cut the jumper underneath the Crickit and solder closed the&nbsp; **ss** &nbsp;pad so that the seesaw chip controls the NeoPixels (for advanced hackers only). See below for use.

![circuit_playground_CPX-Crickit-NeoPixels_aa.png](https://cdn-learn.adafruit.com/assets/assets/000/062/142/medium640/circuit_playground_CPX-Crickit-NeoPixels_aa.png?1537383390)

## Crickit Wing for Feather
If you have a **Feather Crickit** then the NeoPixels are driven by the seesaw chip on the Crickit, and you must send seesaw commands to set colors. But that means no extra pins are needed from your Feather. See below for use.

![circuit_playground_feather-neopixel_bb.png](https://cdn-learn.adafruit.com/assets/assets/000/062/139/medium640/circuit_playground_feather-neopixel_bb.png?1537383235)

## Crickit for micro:bit
If you have a **micro:bit Crickit** , NeoPixels are driven by micro:bit Pin **P16**.&nbsp;

&nbsp;

[Use the Adafruit\_NeoPixel library](https://github.com/adafruit/Adafruit_NeoPixel) to control NeoPixels connected to Crickit through micro:bit P16.

&nbsp;

However, if you want, you can cut the jumper underneath the Crickit and solder closed the&nbsp; **ss** pad so that the seesaw chip controls the NeoPixels (for advanced hackers only). See below.

![circuit_playground_microbit-neopixels_bb.png](https://cdn-learn.adafruit.com/assets/assets/000/062/140/medium640/circuit_playground_microbit-neopixels_bb.png?1537383305)

## Crickit HAT for Raspberry Pi
## Advanced Use - Using Seesaw to Control NeoPixels

Your microcontroller can communicate to the Crickit seesaw chip to have seesaw control the NeoPixels. Adafruit considers this advanced use at the Arduino level and recommends MakeCode or CircuitPython for Crickit NeoPixel. With this in mind, read on.

If you choose to have the NeoPixel driven from the seesaw, note it is on seesaw pin # **20. To use seesaw pin 20 on Circuit Playground Express and micro:bit Crickit, you must cut a jumper on the Crickit circuit board on the back. You can always mend this with solder, but it's NOT something you change back and forth.**

**For FeatherWing for Crickit, the NeoPixels are already connected to seesaw pin 20, you don't need to do the surgery below.**

Turn the Crickit over and locate the jumper block on the bottom as circled in yellow in the first image.

&nbsp;

You will need to take a knife and cut the tiny gold trace pointed by the red arrow to sever the current NeoPixel to microcontroller connection.

&nbsp;

Using a soldering iron, put a mice bright solder connection between the pads as marked by the blue arrow.

&nbsp;

The Seesaw Pin 20 is now connected to the NeoPixel connections on Crickit.

![circuit_playground_seesaw-neopixels-1.png](https://cdn-learn.adafruit.com/assets/assets/000/062/055/medium640/circuit_playground_seesaw-neopixels-1.png?1537306537)

![circuit_playground_seesaw-neopixels-2.png](https://cdn-learn.adafruit.com/assets/assets/000/062/056/medium640/circuit_playground_seesaw-neopixels-2.png?1537306565)

The [Adafruit\_seesaw library](https://github.com/adafruit/Adafruit_Seesaw) has seesaw NeoPixel support. You can get the latest version of this library through the Arduino board manager as described [in this guide on the Arduino page](https://learn.adafruit.com/adafruit-crickit-creative-robotic-interactive-construction-kit/arduino-code).

Your Arduino sketch should include **seesaw\_neopixel.h** which provides the NeoPixel functions for seesaw.

The following example sets up a strand of NeoPixels and runs through some animations.

https://github.com/adafruit/Adafruit_Seesaw/blob/master/examples/NeoPixel/NeoPixel_strandtest/NeoPixel_strandtest.ino

# Introducing Adafruit Crickit #MakeRobotFriend

## Hacks & Upgrades

## Speeding up many requests from Raspberry Pi to CRICKIT

If your project is making a large number of requests from your Raspberry Pi to CRICKIT, the speed of the I2C connection between boards may be an issue. Fortunately this can be changed.

For the best performance, you'll want to consider tweaking the I2C core to run at 1MHz. By default it may be 100KHz or 400KHz

To do this edit the config with&nbsp; **sudo nano /boot/config.txt**

and add to the end of the file

**dtparam=i2c\_baudrate=1000000**

![](https://cdn-learn.adafruit.com/assets/assets/000/068/665/medium800/circuit_playground_raspberry_pi_adafruit_products_i2c_baud.png?1546611705)

## Brown Outs?

The power supply on the Crickit will let you draw 4 Amps at once, which is _a lot_. But perhaps you are turning on all the motors at once, causing the power supply to flicker? An extra large capacitor on the 5V and GND pads may help smooth out that power draw!

Use a large electrolytic capacitor, rated for 10V or higher. Even though the power supply is 5V, you may think you can use a 6.3V capacitor, but you want at least 2x the voltage rating if possible so stick to 10V!

### 4700uF 10v Electrolytic Capacitor

[4700uF 10v Electrolytic Capacitor](https://www.adafruit.com/product/1589)
This Big Freaking Capacitor is just the trick when you have a lot of current sloshing around your project. They'll help smooth out voltage spikes by providing a little buffering. We use these to help stabilize solar panels on our [solar Lipoly...](http://www.adafruit.com/products/390)

In Stock
[Buy Now](https://www.adafruit.com/product/1589)
[Related Guides to the Product](https://learn.adafruit.com/products/1589/guides)
![4700uF 10V through hole  Electrolytic Capacitor](https://cdn-shop.adafruit.com/640x480/1589-02.jpg)

Connect the capacitor using the **NeoPixel** terminal blocks. The **5V** and **GND** lines are shared across the board so even if its a DC motor or servo causing the issues, this will help! It's just the most convenient place to attach a large capacitor because the two terminal blocks are nicely spaced.

Connect the capacitor using the **NeoPixel** terminal blocks. The **5V** and **GND** lines are shared across the board so even if its a DC motor or servo causing the issues, this will help!

&nbsp;

Connect the **Positive** (longer leg) to **5V** and the **Negative** (shorter leg) to **GND**

![circuit_playground_capout.jpg](https://cdn-learn.adafruit.com/assets/assets/000/053/986/medium640/circuit_playground_capout.jpg?1526498415)

# Introducing Adafruit Crickit #MakeRobotFriend

## F.A.Q.

### 

We wanted a unique name, inspired by the original [Cricket robotics platform from MIT](http://cricket.csail.mit.edu/) (which then became the [PicoCricket](https://en.wikipedia.org/wiki/Programmable_Cricket)), but not with the exact same name!

 **My code gives the following error in the REPL/Serial window:**

The code `from adafruit_crickit import crickit` always throws

Traceback (most recent call last):  
File "code.py", line 1, in   
File "adafruit\_crickit.py", line 66, in   
MemoryError: memory allocation failed, allocating 152 bytes

CircuitPython will pull in libraries from **/lib** on the device before looking for any "baked in" ("Frozen" libraries) in the main CircuitPython code. If you are using, for example, the Circuit Playground Express + Crickit build of CircuitPython and you also have the **adafruit\_crickit** &nbsp;and/or **adafruit\_seesaw** libraries in **/lib** , CircuitPython will load the **/lib** version and still have the frozen version in memory. Your program will quickly run out of memory on the Circuit Playground Express.

The fix is fairly easy. Only put the libraries you need in the **/lib** folder of your **CIRCUITPY** drive. For Crickit, use the special Crickit builds of CircuitPython and be sure that the libraries **adafruit\_crickit** and **adafruit\_seesaw** are not in your **/lib** folder. You still have that functionality, but they are already loaded due to the special build.

# Introducing Adafruit Crickit #MakeRobotFriend

## Downloads

# Files

- [PCB Files on GitHub](https://github.com/adafruit/Adafruit_Crickit_PCBs)
- [Fritzing objects in Adafruit Fritzing Library](https://github.com/adafruit/Fritzing-Library)
- [Crickit HAT CAD Files](https://github.com/adafruit/Adafruit_CAD_Parts/tree/main/3957%20CRICKIT%20Hat)
- [Crickit Circuit Playground Express CAD Files](https://github.com/adafruit/Adafruit_CAD_Parts/tree/main/3093%20Crickit%20CPX)

# Datasheets

- [TPS259573 eFuse power supply protection chip](http://www.ti.com/product/TPS2595)
- [DRV8833 DC motor driver chip](http://www.ti.com/product/DRV8833)
- [ULN2003A Darlington driver chip](http://www.ti.com/product/ULN2003A)

# Circuit Playground Crickit Schematics

Click to embiggen

![](https://cdn-learn.adafruit.com/assets/assets/000/053/975/medium800/circuit_playground_schem1.png?1526494138)

![](https://cdn-learn.adafruit.com/assets/assets/000/053/976/medium800/circuit_playground_schem2.png?1526494262)

![](https://cdn-learn.adafruit.com/assets/assets/000/053/977/medium800/circuit_playground_schem3.png?1526494322)

# Crickit HAT Schematics
![](https://cdn-learn.adafruit.com/assets/assets/000/067/684/medium800/circuit_playground_schem3.png?1544825012)

![](https://cdn-learn.adafruit.com/assets/assets/000/067/685/medium800/circuit_playground_schem1.png?1544825013)

![](https://cdn-learn.adafruit.com/assets/assets/000/067/686/medium800/circuit_playground_schem2.png?1544825015)


## 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)
### Adafruit CRICKIT FeatherWing for any Feather

[Adafruit CRICKIT FeatherWing for any Feather](https://www.adafruit.com/product/3343)
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/3343)
[Related Guides to the Product](https://learn.adafruit.com/products/3343/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)
### 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)
### Standard servo - TowerPro SG-5010

[Standard servo - TowerPro SG-5010](https://www.adafruit.com/product/155)
This high-torque standard servo can rotate approximately 180 degrees (90 in each direction). You can use any servo code, hardware, or library to control these servos. Good for beginners who want to make stuff move without building a motor controller with feedback & gearbox. Comes with 3...

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

In Stock
[Buy Now](https://www.adafruit.com/product/169)
[Related Guides to the Product](https://learn.adafruit.com/products/169/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)
### 5V 4A (4000mA) switching power supply - UL Listed

[5V 4A (4000mA) switching power supply - UL Listed](https://www.adafruit.com/product/1466)
Need a lot of 5V power? This switching supply gives a clean regulated 5V output at up to **4 Amps** (4000mA). 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 up at any hardware store for $1 or so,...

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

## Related Guides

- [Adafruit Circuit Playground Express](https://learn.adafruit.com/adafruit-circuit-playground-express.md)
- [Dance-Reactive Tutu Sparkle Skirt](https://learn.adafruit.com/dance-reactive-tutu-sparkle-skirt.md)
- [The Scream: Interactive Screaming Painting](https://learn.adafruit.com/the-scream-munch-screaming-interactive-scream-painting.md)
- [Your First Power Switch Relay Project - Circuit Playground Smart Plug](https://learn.adafruit.com/beginner-first-project-power-switch-relay-circuit-playground-smart-plug.md)
- [Mount for CRICKIT](https://learn.adafruit.com/mount-for-crickit.md)
- [Circuit Playground + CircuitPython Quickstart Guide](https://learn.adafruit.com/circuit-playground-express-circuitpython-5-minute-guide.md)
- [LED Reactive Light-Up Hockey Puck in MakeCode](https://learn.adafruit.com/led-hockey-puck.md)
- [Crawling Baby Sea Turtle Robot](https://learn.adafruit.com/baby-turtle-makecode.md)
- [Using EduBlocks with Circuit Playground Express](https://learn.adafruit.com/using-edublocks-with-circuit-playground-express.md)
- [Makey Paper Craft ](https://learn.adafruit.com/makey-paper-craft.md)
- [Animatronic Glowing Medusa Headdress](https://learn.adafruit.com/animatronic-glowing-medusa-headdress.md)
- [Crickit Powered Holiday Diorama](https://learn.adafruit.com/crickit-powered-holiday-diorama.md)
- [CircuitPython Sound Box](https://learn.adafruit.com/circuitpython-sound-box.md)
- [Make it Move with Crickit](https://learn.adafruit.com/make-it-move-with-crickit.md)
- [Circuit Playground Slouch Detector](https://learn.adafruit.com/circuit-playground-slouch-detector.md)
- [Robotic Creatures ](https://learn.adafruit.com/robotic-creatures.md)
