# Hello World of Robotics with Crickit

## Overview

https://youtu.be/iCcpYbFLfrU

Robotics has been tough to get into. Be it initial planning, software requirements, expensive hardware, and endless integration. We've been there, [even poor Ladyada and her MIT robotics class back in the day](https://learn.adafruit.com/adabox008/a-crickit-manifesto).

**Today, robotics does not have to take extensive planning, arcane software, expensive hardware or anything else! Seriously! How is this so?**

Today's modern innovations have all come together to bring robotics to the level that anyone can do sitting down in one session. Be that at your kitchen table, workbench, or in a classroom. In any of these settings, with some simple parts and any common computer, **you can easily accomplish what is presented in this guide**.

This may seem like a lot of pages for a "Hello World" introductory guide. We added pages for each step to ensure we cover things, so it's not a huge amount of information, it's just step by step to get you going on the right foot!

## Parts List

Things you will want to have from the Adafruit shop:

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

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

### USB cable - USB A to Micro-B

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

Approximately 3 feet / 1 meter long

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

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

Either:

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

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

### Alkaline AA batteries (LR6) - 3 pack

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

In Stock
[Buy Now](https://www.adafruit.com/product/3521)
[Related Guides to the Product](https://learn.adafruit.com/products/3521/guides)
![Angled shot of 3 AA batteries.](https://cdn-shop.adafruit.com/640x480/3521-00.jpg)

or:

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

# **Other Parts You'll Need**

But feel free to improvise!

1 x drink straw (preferably), or popsicle stick, or plastic spoon

2 x bit of tape

1 x paper: plain or printed (a sample graphic is in this guide)

# **Tools**

Medium Phillips Screwdriver (connecting Circuit Playground Express to the Crickit)

Small Phillips screwdriver (for servo horn connections)

# Hello World of Robotics with Crickit

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

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

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

# Hello World of Robotics with Crickit

## Make Your Waving Arm

![](https://cdn-learn.adafruit.com/assets/assets/000/057/509/medium800/express_9a.jpg?1531339370)

## Making Your Servo Arm Attachment

It is much more satisfying having your first robotics project wave something rather than just seeing the servo move back and forth.

## The Pole

Get one of the following items from around the house, the classroom, the store or a cafeteria:

- A drinking straw (preferred, nice & lightweight)
- A popsicle stick
- A small plastic spoon

That will be attached to the servo. Now we need something to attach to wave to us.

## The Arm or Other Wavy Part

You can do one of the following things:

- Print out the Adabot head and arm in the green link below in PDF form.&nbsp;
- Print out any character you like on the printer. Or if you have a magazine or other material you are permitted to cut things out of, cut out your favorite character.
- On a piece of paper, use a pencil or crayon to trace your hand (fingers together) to make a hand on the paper.

[Adabot.pdf](https://cdn-learn.adafruit.com/assets/assets/000/057/584/original/Adabot.pdf?1531447152)
## Attachment to the Servo

Get some tape. Probably clear but any tape will do.

Cut out the waving part of the shape you want from the paper with scissors, if necessary.

Get your servo and one of the included horn pieces that has two arms 180 degrees apart. Using the short screw provided, connect the horn to the servo. The horn will press fit and then the screw will secure the horn. Never use one of the long screws or it could damage the servo.

![express_5a.jpg](https://cdn-learn.adafruit.com/assets/assets/000/057/461/medium640/express_5a.jpg?1531251791)

Now tape your waving arm to the servo horn with some firm tape. As this will be moving, use some strong tape and go around things several times.

&nbsp;

Or, I found using one of the long screws held my straw. The horn has some tiny holes to help, you might have to get the hole a bit bigger to get the screw in.

![express_3b.jpg](https://cdn-learn.adafruit.com/assets/assets/000/057/460/medium640/express_3b.jpg?1531251642)

There you go, the servo assembly is complete! Now to hook all the rest of the parts together on the next page.

# Hello World of Robotics with Crickit

## Hook It All Up!

![](https://cdn-learn.adafruit.com/assets/assets/000/057/293/medium800/express_crickit_and_micro_servo_processed.jpg?1531148225)

# Plug your servo wiring into the Crickit Servo block

Servo wires might vary in color a bit, but here's the way to plug in the servo connector to Crickit: the lightest servo wire (white/yellow) goes closest to the number 1 on the outside of the board. The darkest wire (brown/black) goes in towards the center of Crickit.

# Power Your Crickit

You can power Crickit two ways:

1) Use a 3x AA battery pack and 3 AA batteries

2) Use a wall power supply. 5 volts, 2 amps.

![](https://cdn-learn.adafruit.com/assets/assets/000/057/294/medium800/express_crickit_and_micro_servo_and_power.jpg?1531148866)

Plug the power supply female connector into the Crickit power connector.

There is a tiny off/on switch near the power connector. **Please move the switch to the ON position now and look at the tiny LEDs near the switch.&nbsp;**

**You should see the green LED next to the smiley face lit.**

If you see the yellow LED next to the warning triangle, your voltage is not good. Unplug the power to Crickit and see if it is too much voltage (more than 3 AA batteries) or a power supply that is more than 5 volts. You should not use a 6 volt, 9 volt, or higher supply, the Crickit cannot convert the voltage down.

You can use the on/off switch on the Crickit to turn the power off while working on the code. Just remember to turn the power back on when you're ready.

# Connect Circuit Playground to Your Computer

Use a known good USB A to micro B connection cable from the Circuit Playground Express micro B connection (above the Crickit Power connector) to your computer.

**Don't plug into the Crickit's USB port!**

The micro-B USB connector is D-shaped and only plugs in one way. When plugging the cable in to the Circuit Playground Express, gently, with the round part down and the flat part up, wiggle the connector in.

&nbsp;

If it doesn't seem to fit, pull apart, look, and try again. When it does fit together it may look like the cable isn't all the way in, it most likely is.

![express_C03F002.png](https://cdn-learn.adafruit.com/assets/assets/000/057/296/medium640/express_C03F002.png?1531149195)

![express_C03F003.jpg](https://cdn-learn.adafruit.com/assets/assets/000/057/297/medium640/express_C03F003.jpg?1531149207)

# Connect USB to Your Computer

If you have a Macbook Pro or other fancy thin modern laptop, you may need a USB Type C to USB type A conversion dongle.

Most other laptop and desktop PCs have USB type A connections. USB 2 or USB 3 should be fine although USB 2 might be a good thing if you have both types of connections on your computer.

With the Circuit Playground Express end of the cable connected, connect the USB A side of the cable to the computer.

On Windows, you'll probably hear a sound as "Universal Plug & Play" detects your device and sets things up. This is all good.&nbsp;

Your setup should look like this:

![](https://cdn-learn.adafruit.com/assets/assets/000/057/512/medium800/express_8a.jpg?1531339428)

# Choosing Which Code to Use

There's two ways you can program your robot

You can program this project in either **Microsoft MakeCode** , a block (Scratch-like) language that only needs an Internet-connected web browser. You'll be downloading the code from the browser direct to the Circuit Playground Express flash memory.

**or**

**CircuitPython** , an implementation of Python for microcontrollers. You'll edit a small text file and drop it onto the Circuit Playground Express flash drive.

It is your choice and this guide explains both methods. You can jump to the appropriate page to run the software of your choice. You can always switch later, your decision is not binding!

If you are unsure, try MakeCode first and you can then consider CircuitPython afterwards.

# Hello World of Robotics with Crickit

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

# Hello World of Robotics with Crickit

## Using MakeCode

Here is a simple program which will wave our servo arm:

![](https://cdn-learn.adafruit.com/assets/assets/000/057/466/medium800/express_hello-world-simple-mc.png?1531256470)

This code will move the servo motor to 70 degrees, wait a second (which is 1000 milliseconds), move the servo motor to 135 degrees, wait another second, then repeat forever. This should result in a waving motion.

Danger: 

## Adding Sound and Light Easily - The Final Code

MakeCode can play musical notes or preset short sounds. Below, a cute sound has been added when Adabot's arm waves.

The `on start` block sets the Circuit Playground lights to light blue as a background for Adabot's head. The `forever` loop waves Adabot's arm via the servo until power is removed.

![](https://cdn-learn.adafruit.com/assets/assets/000/057/465/medium800/express_hello-world-makecode.png?1531256137)

[See the full project on the MakeCode Website](https://makecode.com/_6LL1YHKWVTFt)
And here is the MakeCode Robot in action:

https://youtu.be/lOVxSqqrt9g

# Hello World of Robotics with Crickit

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

# Hello World of Robotics with Crickit

## Using CircuitPython

https://youtu.be/iCcpYbFLfrU

If you would like to try out CircuitPython, you will find it rather easy to use compared to other programming environments. If you like, you can read about everything in the Adafruit [Welcome to CircuitPython](https://learn.adafruit.com/welcome-to-circuitpython "Welcome to CircuitPython guide") Guide.

First, since we're going to use sound in the CircuitPython version of Hello World, hook a speaker up to the Crickit speaker terminals (to the right in the diagram below). If you have the AdaBox 008 mini-speaker, the white wires can go in either terminal, there is no red/black polarity. If you have a 4 or 8 ohm metal speaker, you'll get better sound. The Adafruit shop has a nice selection of speakers.

![](https://cdn-learn.adafruit.com/assets/assets/000/057/492/medium800/express_servo_speaker_bb.png?1531334307)

# Writing Code With Mu

Adafruit recommends the Mu editor to type your code into and interact with your project. You can find out how to install Mu on mac, PC, and linux in [this guide page](https://learn.adafruit.com/welcome-to-circuitpython/installing-mu-editor "Installing Mu") on the Adafruit Learning System.

The advantage to using Mu is it has an editor and added features like direct save to Circuit Playground Express and access to the Express' REPL interactive command line and print output. Mu can even plot values for you.

# The Program

The code below will use the `adafruit_crickit` library which provides powerful, high level access to the Crickit features.

Just like MakeCode, the goal is to move the servo to wave our arm.

Also, CircuitPython does have the ability to play real WAV audio file sounds. Adafruit has created a simple WAV file for this project, Adabot saying "Hello World"!

The goal will be to wave the flag and say Hello World.

The code for this is shown below:

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

Using Mu (or your text editor), copy this code and save it to your computer (wherever you save things for later, perhaps a Documents folder or a flash drive you brought to class), naming it **code.py**

Also download the Hello World WAV file named hello.wav by clicking the green button below, downloading and saving the file into the same place as your code. The **code.py** and **hello.wav** will go together in the root directory of your **CIRCUITPY** flash drive.

[Click to download hello.wav](https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/Crickits/Crickit_Hello_World/hello.wav)
# Installing Code On CircuitPlayground

At this point, make sure your Crickit and Circuit Playground Express are both plugged in per the [Wiring It Up page](https://learn.adafruit.com/hello-world-of-robotics-with-crickit/wire-it-up). The Crickit should have battery or wall power and a green light next to the smiley face. The round Circuit Playground Express should have a USB cable connected from its micro-B silver connector to your computer.

Now, on your desktop or laptop computer, navigate to where you saved your **code.py** and **hello.wav** files.

If you have correctly connected your Circuit Playground Express to your computer, you should have a drive named **CIRCUITPY** listed among the disk drives. That is the Circuit Playground Express flash memory.

![](https://cdn-learn.adafruit.com/assets/assets/000/057/207/medium800/express_C06F002.png?1530891030)

Copy (usually by dragging the files and dropping them) to the **CIRCUITPY** drive. First **hello.wav** , second **code.py**.

![](https://cdn-learn.adafruit.com/assets/assets/000/057/209/medium800/express_files.png?1530891918)

As soon as the **code.py** is detected on the **CIRCUITPY** drive, CircuitPython will run your code. If it doesn't, you can press the Circuit Playground Express Reset button once to get it going or&nbsp; open the Mu REPL by pressing the REPL button and typing the Ctrl-D key..

When running, you should hear Adabot say "Hello World" once and the arm should start waving! You've made your first robotics project!!

# Hello World of Robotics with Crickit

## You Have a Robot!

![](https://cdn-learn.adafruit.com/assets/assets/000/057/487/medium800/express_make-600x450.gif?1531333753)

Congratulations. With a few parts you have made your first robotics project.

The basics shown in this guide and others on the Adafruit Learning System will allow you to customize your own projects.

If you are working with CircuitPython and want to create your own WAV files, please [follow this guide on ensuring the audio files are in the right format](https://learn.adafruit.com/microcontroller-compatible-audio-file-conversion "Audio File Conversion") for Circuit Playground Express or other Adafruit microcontrollers. The audio files should not be too large (like a whole pop song) as space is limited on microcontrollers. Most sound effects and short sentences should work fine.

You can pick the colors for the NeoPixels for CircuitPython from the handy guide at&nbsp;[https://www.w3schools.com/colors/colors\_picker.asp](https://www.w3schools.com/colors/colors_picker.asp "Color Picker").


## Guide Products

### Adafruit CRICKIT for Circuit Playground Express

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

So if you find...

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

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

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

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

Approximately 3 feet / 1 meter long

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

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

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

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

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

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

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

## Related Guides

- [Adafruit Circuit Playground Express](https://learn.adafruit.com/adafruit-circuit-playground-express.md)
- [Adafruit  PCA9685 16-Channel Servo Driver](https://learn.adafruit.com/16-channel-pwm-servo-driver.md)
- [CLUE Sensor Plotter in CircuitPython](https://learn.adafruit.com/clue-sensor-plotter-circuitpython.md)
- [Glue Stick Light Pipe Sculpture](https://learn.adafruit.com/glue-stick-archway.md)
- [CLUE Vertical Garden Weather Visualizer](https://learn.adafruit.com/clue-vertical-garden-weather-visualizer.md)
- [Lucky Cat with Circuit Playground Express](https://learn.adafruit.com/lucky-cat-with-circuit-playground-express.md)
- [Star Trek Soundboard with NeoTrellis](https://learn.adafruit.com/star-trek-sound-board-with-neotrellism4.md)
- [Digi-Key IoT Studio Mini Smart Home](https://learn.adafruit.com/digikey-iot-studio-smart-home.md)
- [Circuit Playground Express Spooky Laughing Box](https://learn.adafruit.com/spooky-circuit-playground-express-mystery-box.md)
- [MakeCode for Circuit Playground Express](https://learn.adafruit.com/makecode.md)
- [Matrix Portal Scoreboard](https://learn.adafruit.com/matrix-portal-scoreboard.md)
- [HalloWing Jump Scare Trap](https://learn.adafruit.com/hallowing-jump-scare-trap.md)
- [Textable Sensor with FONA and CircuitPython](https://learn.adafruit.com/textable-sensor-with-fona-and-circuitpython.md)
- [Terminator Eyeball Upgrade](https://learn.adafruit.com/terminator-eyeball-upgrade.md)
- [Best Beginner Boards for Teachers](https://learn.adafruit.com/best-beginner-boards-for-teachers.md)
- [NYE Circuit Playground Drop](https://learn.adafruit.com/nye-circuit-playground-drop.md)
