# Circuit Playground Lesson #0

## Intro

![](https://cdn-learn.adafruit.com/assets/assets/000/033/895/medium800/circuit_playground_hand.jpg?1468547810)

# Hi there!

If you're here, it's because you want to learn how to build and make stuff with electronics! ([If, rather than learn electronics, you'd like to look at pictures of cats instead, please check https://www.adafruit.com/galleries/cats-of-engineering](https://www.adafruit.com/galleries/cats-of-engineering))

And, you're in luck: there's _never_ been a better time.

Gone are the days where you need thousands of dollars of equipment and lots physics/math background. Nowadays, if you want to learn to work with electronics, you can jump right in for $20 or less, and any sort of computer. And we're talking about learning _a lot_ of electronics - from the basics of analog to the complexities of firmware. With a good pack of parts, you can build a base of knowledge that will take you from your first blinking LED to someone who can start prototyping and inventing custom products.

# Who is this for?

Anyone with a computer they can install software on, an Arduino or compatible and the ability to type and click a mouse. That's pretty much the minimum.

**You don't need to know a lot of physics or math** , and just like an Art Degree isn't required for making art and being creative, **you _don't_ need to have a computer science degree**. It helps if you're comfortable using computers but that's a skill most people pick up through life.

**If you know how to program already - great! If not, don't worry, we'll teach you enough to be dangerous.**

# What is a Circuit Playground?

Circuit Playground is the name of the little round electronic circuit board that you are going to use as a tool to investigate and explore programming & electronics. Think of it as like a Swiss Army Knife or multi-tool for learning electronics as an art form! It is an all-in-one board so&nbsp; you can jump in quickly and do a whole lotta projects (It can slice, it can dice, it has lots of blinky LEDs!)

Circuit Playground can light up multicolored LEDs (make beautiful lighting effects), make sounds (like a synthesizer!), detect touch or color, sense the enviroment like temperature, sound, and motion, and more!

By programming your Playground with software, you can combine all these abilities. For example, it can use the sound sensor to listen to music, and then pulse the LEDs to react to the melody and rhythm it hears. Or, you can use the motion sensor to detect when someone moves your purse and play a loud alarm to scare them off!

**Circuit Playground works with the Arduino software.** You can use the Arduino IDE software to program Circuit Playground. The main chip in Circuit Playground is natively supported, which means you can use the thousands of projets and tutorials seamlessly!

**Best of all, no soldering required!** You do not need _anything_ to get started other than a Circuit Playground, a common USB cable and any computer (Windows/Mac/Linux/Chromebook)

https://youtu.be/jKUf5wBq2Xk

# Who are you?

Great question. This is me:

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

I'm Ladyada, and I love to teach people how to build stuff and how they can be creative with technology.

So, are you ready?

Let's do this thing!

# Circuit Playground Lesson #0

## About This Lesson

![](https://cdn-learn.adafruit.com/assets/assets/000/033/897/medium800/circuit_playground_SearsHouse115.jpg?1468550162)

This lesson won't teach any electronics, really. Its more for making sure that everything is setup and _ready_ for the future lessons. It will verify the Circuit Playground is working as intended and that the computer you are using is compatible.

Think of this tutorial as the **'home base'** of your journey. If things ever get into a weird spot _come back here and re-verify this lesson!_

One of the most important skills you'll have to learn is that when things go wrong (and they will, _tons_) come back to the most basic assumptions. This is a little bit of the "are you sure its on" of electronics. It's surprising how many skilled engineers will spend hours debugging a circuit to realize that...it wasn't plugged in!

# Circuit Playground Lesson #0

## Lesson Parts

# Required:
A **Circuit Playground**! Of course, this is essential, and is required for all lessons.

[Available at Adafruit](https://www.adafruit.com/products/3000)

![circuit_playground_plainboard.jpg](https://cdn-learn.adafruit.com/assets/assets/000/033/898/medium640/circuit_playground_plainboard.jpg?1468550317)

 **Micro USB Cable** any length. You probably have one of these around, they're the most common USB cable.

&nbsp;

_ **Make sure its a data/sync cable!** _

&nbsp;

[USB cable available at Adafruit](https://www.adafruit.com/products/592)

![circuit_playground_592-01.jpg](https://cdn-learn.adafruit.com/assets/assets/000/033/900/medium640/circuit_playground_592-01.jpg?1468550491)

Warning: 

# Not Required but... Recommended!
If you'd like to power your Playground for portable use, you can use a 3 x AAA battery holder with a JST PH-2 connector on it. These holders even come with an on/off switch so you can save battery when not in use.

![circuit_playground_aaaholder.jpg](https://cdn-learn.adafruit.com/assets/assets/000/033/901/medium640/circuit_playground_aaaholder.jpg?1468550651)

![circuit_playground_aaholderopen.jpg](https://cdn-learn.adafruit.com/assets/assets/000/033/902/medium640/circuit_playground_aaholderopen.jpg?1468550653)

Of course, 3 AAA batteries are required as well. Circuit playground works best with Alkaline or rechargeable NiMH batteries.

You can also use other AAA batteries such as Zinc or Lithium. NiCad batteries are not recommended.

Please use rechargeable batteries if you can, to reduce waste!

![circuit_playground_batts.jpg](https://cdn-learn.adafruit.com/assets/assets/000/033/903/medium640/circuit_playground_batts.jpg?1468550692)

# Circuit Playground Lesson #0

## Take a Tour!

![](https://cdn-learn.adafruit.com/assets/assets/000/033/904/medium800/circuit_playground_arduino_cow.png?1468550844)

_It's handy to know the names for parts of a cow when talking about cuts of meat!_

Here we'll take a tour and point out the names of the Circuit Playground. You'll want to refer back to this page a ton, so keep it handy when we say something like "JST connector" or "Reset button"

# The Parts of a Circuit Playground

Here's a rough version of the parts of an Circuit Playground we'll refer to. Each part is covered in more detail in the next sections

![](https://cdn-learn.adafruit.com/assets/assets/000/033/947/medium800/circuit_playground_Circuit-Playground-Labeled.jpg?1468606947)

# Circuit Playground Lesson #0

## Microcontroller

Info: 

# Main Chip / Microcontroller

This is the 'brains' of the Circuit Playground. The thing that you program when you program! It's what runs the code, the **CPU** (Central Processing Unit). Kinda like the processor that runs in your computer but much much much simpler and smaller.

![](https://cdn-learn.adafruit.com/assets/assets/000/033/906/medium800/circuit_playground_atmega.jpg?1468552664)

The chip has very thin little _legs_ that go around it, you can see the little silver dots that connect each leg of the microcontroller to the circuit board. Those dots both mechanically _and_ electrically connect the CPU - so it can send data to and from your computer and those sensors and lights.

Each one of those mini legs are called _pins_ because older microcontrollers used to look like this:

![](https://cdn-learn.adafruit.com/assets/assets/000/033/908/medium800/circuit_playground_arduino_123-02.jpg?1468552825)

Where each of the legs really do look like sharp pins. Those older microcontrollers are really big, though. And so over time the 'controllers got hit with a shrink ray until they looked like this:

![](https://cdn-learn.adafruit.com/assets/assets/000/033/909/medium800/circuit_playground_qfn.jpg?1468552970)

_[Image by Osamu](https://www.flickr.com/photos/osamu_iwasaki/6183639411/)_

Yep that little square has all the circuitry of the bigger chip, but so small you have to use tweezers to pick it up!

# Our Pal, the ATMEGA32u4

The Circuit Playground **microcontroller** is called the ATmega32u4 and it has:

- 44 Pins
- Powered by 3 Volts
- Requires about 0.1 Watts of power
- Runs at 8 MHz
- 32 KB of flash storage
- ~2 KB of RAM
- Costs about $5 per

Compare this to, at the time of writing, a common **computer** chip, the Intel i5-6400

![](https://cdn-learn.adafruit.com/assets/assets/000/033/910/medium800/circuit_playground_arduino_getimage.jpg?1468553215)

- 1151 Pins
- Powered by 1.35 Volts
- Requires about 35 Watts of power
- Runs at 2800 MHz
- No internal Flash storage, but most computers have at least 250 GB = 250,000 MB = 250,000,000 KB\* of storage
- No internal RAM but most computers have at least 4 GB = 4,000 MB = 4,000,000\* KB of RAM
- Costs about $200

_(\* yes I know its not exactly 1000)_

So, clearly if you want an ultra powerful computer processor that can play the latest games, an i5 is the way to go. But its expensive, and requires a ton of power, and you need to have a full motherboard to run it so it's kinda big. If you just want to do some simple tasks, a microcontroller like the '32u4 is peachy. Also, its quite handy that it has the RAM and storage inside of it - its not a lot but that means you don't need to hook up a hard drive to this chip, its very compact and complete.

# Simplicity & Sturdiness

What's cool about the microcontroller is that unlike your computer which requires an operating system (Mac OS X or Windows) and booting up, the microcontroller is 'barebones'. When you plug it in, it immediately runs whatever code you asked it to do.

And, you don't have to worry about a diskette or hard drive or cd-rom getting scratched or damaged. The storage inside of the chip lasts for a _really long time._ You could program your Arduino, leave it alone for decades, even hundreds of years & come back and power it up with a post-apocalyptic-cyber-battery and it would work just as new.

# Circuit Playground Lesson #0

## Battery Jack & Supply

Info: 

# Battery Power Jack

There are two ways to power your Circuit Playground: you can use the USB connector to connect to a computer or portable USB power pack _or_ you can plug in a battery pack. USB can be used to power and program. The battery connection can only be used for power - but it's great for when you want to take your Circuit Playground out into the world

This is the Battery Power Jack:

![](https://cdn-learn.adafruit.com/assets/assets/000/033/922/medium800/circuit_playground_jst.jpg?1468555386)

The technical specifications for the jack is:

**JST PH type 2-pin connector** Pin #1 Power and Pin #2 Ground

You can use this with any battery pack that can provide at least 3.5V DC and up to 6.5V DC. In particular it works really well with 3 x 1.5V batteries, like this 3 x AAA battery holder

![](https://cdn-learn.adafruit.com/assets/assets/000/033/912/medium800/circuit_playground_aaaholder.jpg?1468553553)

Advanced users can connect up a single-cell rechargeable lithium ion or lithium polymer battery

![](https://cdn-learn.adafruit.com/assets/assets/000/033/913/medium800/circuit_playground_lipoly.jpg?1468553638)

Lithium Ion or Polymer batteries are more difficult to use and require much more care than rechargeable AAA's so we don't recommend them.

**Circuit Playground does not have battery charging built in** so no matter what rechargeable battery you have, you will need a separate charger as well.

# Onboard Power Supply

Circuit Playground is designed for beginners so it has some protection and _regulation_ circuitry so that it is flexible about how it is powered. In particular there is a polarity protection diode (to avoid destroying the board if you have a backwards-connected battery). It also has an **onboard 3.3V Power Supply:**

![](https://cdn-learn.adafruit.com/assets/assets/000/033/923/medium800/circuit_playground_psupp.jpg?1468555395)

This means you can power it from anywhere between 3.5V up to 6.5V and it will automatically _regulate_ it down to a clean 3.3V

Think of it like a barber. When you go to the hair salon, you have long uneven hair (just like the large, uneven power that is fed into the Circuit Playground from a battery pack). The stylist takes out the scissors and says **OK how long do you want your hair?** and you reply **3.3 inches long!**

![](https://cdn-learn.adafruit.com/assets/assets/000/033/915/medium800/circuit_playground_3.3vcut.gif?1468553908)

\>snip snip\< and your hair is cut straight off, leaving a very clean line.

Just make sure all of your hair, err... **battery voltage** is&nbsp;_at least 3.5 Volts_ because the regulator needs some extra length to work with.

Info: 

# Output Current

When powering Circuit Playground, you can draw at _most 5_00 milliAmps of current. This is not a guarantee because you also have to make sure that the regulator doesn't overheat. If you're using some other voltage input, the max current you can pull continously is _approximately_

`250 milliWatt / (Input Voltage - 0.3 - 3.3 V) = in milliAmps`

So for 5V USB in, the max for _continuous_ current is 250/(5-0.3-3.3) = 178 milliAmps

This is just a rough estimate and depends on if the power usage is continuous or just once in a while.

# Circuit Playground Lesson #0

## USB Connection

Info: 

The USB Jack is next up in our tour

![](https://cdn-learn.adafruit.com/assets/assets/000/033/916/medium800/circuit_playground_microsub.jpg?1468554314)

# USB Jack

As we talked about in the beginning, this is how you connect your Arduino to your computer. You can use any computer with a USB port. You will need a cable to connect! This cable is usually not included.

![](https://cdn-learn.adafruit.com/assets/assets/000/033/917/medium800/circuit_playground_592-01.jpg?1468554334)

Make sure you have a Micro USB cable

Danger: 

I can't stress it enough. Make sure you have a good USB cable. Naughty USB cables will really ruin your day, like a stone in your shoe. Just thow out bad cables and replace with a good one - they are designed to be disposable!

# USB Interface Chip??

If you're coming from any background with an Arduino you're used to having a secondary chip on the circuit board that acts as the **USB to Serial Interface Translator chip**. Circuit Playground does not have one of these! That's because the ATmega32u4 processor does the USB for you&nbsp;_natively_ without the need for a second chip. There's a few tradeoffs, in particular you may need to reset the chip if the USB crashes but you'll learn how to do that

# Powering over USB

For permanent installation, you can power your Circuit Playground using a USB wall adapter - these come with almost every phone and gadget these days. They have a nice clean 5V output. Some have an output up to 5.5V but thats OK. Basically, if it has a USB connection it will power your 'play just fine!

![](https://cdn-learn.adafruit.com/assets/assets/000/033/918/medium800/circuit_playground_arduino_501-04.jpg?1468554848)

You can _sometimes_ power an Circuit Playground project off of a portable USB power pack but these packs are often designed to charge a phone and the 'Play uses so little power that it will cause the pack to think that it is "done charging" and auto-shutoff

![](https://cdn-learn.adafruit.com/assets/assets/000/033/919/medium800/circuit_playground_arduino_1959-00.jpg?1468554878)

So, try it out but your mileage may vary.

# Circuit Playground Lesson #0

## Basic LEDs

Info: 

Your Circuit Playground has some lights that it can use to give you an idea of what it is up to.

These lights, called **LEDs** (pronounced Ell Eee Dee), are on just about every electronic device you own. Often times they're used to let you know if something is on and if there's an error. For example, here's a cable modem with multiple LEDs.

![](https://cdn-learn.adafruit.com/assets/assets/000/033/920/medium800/circuit_playground_arduino_SBV6120E.jpg?1468554970)

_[Image from Wikipedia](https://en.wikipedia.org/wiki/Cable_modem#/media/File:SBV6120E.jpg)_

Each LED indicates the status of the modem.&nbsp; For example, on this device the one to the right is the **POWER** LED, its lit if there's good power. In the middle is the **ONLINE** LED, which lets you know if the modem was able to connect to the Internet.

# Circuit Playground Basic LEDs

Likewise, the Circuit Playground has **two** basic (single-color) LEDs:&nbsp; **ON** &nbsp;and&nbsp; **#13**

![](https://cdn-learn.adafruit.com/assets/assets/000/033/921/medium800/circuit_playground_leds.jpg?1468555078)

They sit to the left and right of the Micro USB jack

**ON** LED - this LED will shine green whenever the Circuit Playground is powered. Always check this LED if your board is not acting right, if its flickering or off then you should check your power supply

**#13** LED - this is the one LED that you can control. The ON lights up automatically no matter what. The **#13** LED, however, is connected to one of the main microcontroller's pins and you can turn it on or off when you start writing code. This LED also pulses to let you know when the _bootloader_ is active and ready to receive a program

It's called lucky **#13** because it is connected to pin number 13 on the microcontroller!

# Library Reference

You can turn the #13 LED on by calling the procedure `CircuitPlayground.redLED(true)` and turn it off with `CircuitPlayground.redLED(false)`

# Circuit Playground Lesson #0

## Reset Button & Bootloader

![](https://cdn-learn.adafruit.com/assets/assets/000/090/798/medium800/classic_circuit_playground_resetbutton.jpg?1588264811)

There's a special mini button labeled **RESET** right below the microcontroller. This is the, well, _reset_ button. It will perform a clean restart of the microcontroller or let you start the bootloader by hand.

## Re-starting/Resetting

To re-start your Circuit Playground (basically, same as turning it off and back on again) - **click the reset button once**. The Circuit Playground will restart itself.

## Bootloader Mode

To start the Circuit Playground bootloader - **click the reset button twice**. The bootloader will run for 10 seconds during which time you can upload new code. You shouldn't have to do this unless something got a little confused in the 'Play, but its an essential skill! During bootloader mode, the red #13 LED will breate on and off once a second.

It's good to practice both resetting (single click) and bootloading (double click). [Check the Power Up test page for more details.](../../../../circuit-playground-lesson-number-0/power-up-test#bootloader-reset-test)

![](https://cdn-learn.adafruit.com/assets/assets/000/034/079/medium800thumb/circuit_playground_bootloader.jpg?1468973713)

# Circuit Playground Lesson #0

## Buttons & Slide Switch

![](https://cdn-learn.adafruit.com/assets/assets/000/033/962/medium800/circuit_playground_buttons.jpg?1468721099)

Now we're starting to get to the sensors built into the Circuit Playground. These are parts that are normally _not_ included on an Arduino-like board. They are yours to play with and use as you travel on the path of learning!

# Two Pushbuttons
![](https://cdn-learn.adafruit.com/assets/assets/000/033/963/medium800/circuit_playground_buttz.jpg?1468721210)

There are two momentary pushbuttons, you can use these in any of your projects to change modes, indicate when to start or stop a sketch, modify behavior, really anything!

- The **Left** button is connected to digital pin **#4**
- The **Right** button is connected to digital pin **#19**

Both have 10KΩ _pull-down_ resistors. That means that when the button is _pressed_ the value read off those pins will be 'high'. You'll learn more about that later, but its here for your reference

# Slide Switch
![](https://cdn-learn.adafruit.com/assets/assets/000/033/964/medium800/circuit_playground_slide.jpg?1468721372)

The slide switch is near the center, right above the JST Battery Jack. There's a little nub you can _slide_ left or right. This switch is connected to **digital pin #21**. When switched to the left, the value reading is 'high' (thus the + symbol) and when switched right, the value read is 'low' (- symbol).

# Library Reference
### slideSwitch

You can call `CircuitPlayground.slideSwitch()` to tell you which way the switch is flipped. It will return **true** if the switch is to the left (+ side) and **false** if the switch is to the right (- side)

### leftButton and rightButton

You can ask if the buttons are pressed by calling `CircuitPlayground.leftButton()` or `CircuitPlayground.rightButton()`. They will return **true** if and only if the button in question is being pressed right when the function is called.

# Circuit Playground Lesson #0

## NeoPixels

One of the fanciest accessories on Circuit Playground are ten (10!) full color LEDs called NeoPixels. Each of these ten Pixels contain bright red+green+blue sub-LEDs and can display any of 16,777,216 different colors!

![](https://cdn-learn.adafruit.com/assets/assets/000/034/010/medium800/circuit_playground_neoz.jpg?1468889252)

These pixels are controlled by a single data pin, **#17**. Unlike non-smart RGB LEDs, you can set the color and a little chip inside the LED will handle the PWM for you.

Since they are controlled in a _chain_, you will need to tell the Circuit Playground's NeoPixel code which one you want to set the color for. Each NeoPixel is numbered, starting with #0 at the top left and going counter clockwise till you reach #9

![](https://cdn-learn.adafruit.com/assets/assets/000/034/012/medium800/circuit_playground_neoorder.jpg?1468889969)

# Library Reference

### setPixelColor

You can set the color for each pixel with the built in NeoPixel library:

`CircuitPlayground.setPixelColor(n, red, green, blue)`

Where _n_ is between 0 and 9 and indicates which LED you are setting.&nbsp;_red/green/blue_ vary between 0 (off) and 255 (full on)

### clearPixels

You can quickly turn _all_ the LEDs off with `CircuitPlayground.clearPixels()`

### setBrightness

By default the _global_ brightness of the LEDs is set to 30 out of 255. This means that the LEDs won't be _insanely_ bright when you first use them.

You can change the global brightness at the beginning of the sketch (in setup) by running `CircuitPlayground.setBrightness(b)` where _b_ varies from 0 (no LEDs will ever light) to 255 (incredibly bright!)

**setBrightness only affects pixel colors set after it is called.** That is, if you set an LED color and then call setBrightness, it wont affect that older LED color. Only going forward will the brightness change to be different.

# Circuit Playground Lesson #0

## Temperature Sensor

![](https://cdn-learn.adafruit.com/assets/assets/000/034/013/medium800/circuit_playground_temp.jpg?1468890805)

You can sense the temperature using the onboard thermistor. A thermistor is a resistor that changes it's resistance based on the temperature. They are a _little_ more complex to use than temperature sensors that spit out Celsius, but they're also much less expensive.

We use the NTC thermistor ([Murata NCP15XH103F03RC](https://cdn-shop.adafruit.com/product-files/3000/NCP15XH103F03RC.pdf)) for temperature sensing. While it isn't an all-in-one temperature sensor, with linear output, it's easy to calculate the temperature based on the analog voltage on analog pin **#A0**. There's a 10K 1% resistor connected to it as a pull down. [You can read the analog value and calculate the temperature with the beta-constant](../../../../thermistor/), or just use the Circuit Playground library

# Library Reference

You can retreive the current calculated temperature with `CircuitPlayground.temperature()` which will return you a floating point number in Centigrade. If you need&nbsp;Fahrenheit use `CircuitPlayground.temperatureF()`

# Circuit Playground Lesson #0

## Light Sensor

![](https://cdn-learn.adafruit.com/assets/assets/000/034/014/medium800/circuit_playground_alspt19.jpg?1468891393)

There is an analog light sensor, [part number ALS-PT19](https://cdn-shop.adafruit.com/product-files/2748/2748%20datasheet.pdf), in the top left part of the board. This can be used to detect ambient light, with similar spectral response to the human eye. There is a 10K balancing resistor to convert the current drive to voltage.

This sensor is connect to analog pin # **A5** , you can use analogRead or the library to read the analog value. It will read between 0 and 1023 with higher values corresponding to brighter light levels. The range is approximately 0 Lux to 1500 Lux maximum.

1000 Lux will roughly read as 2 Volts (or about 680 as a raw analog reading). A reading of about 300 is common for most indoor light levels. Note that outdoor daylight is 10,000 Lux or even higher, so this sensor is best suited for indoor light levels!

# Library Reference

You can request the raw analog reading (0 = no light, up to 1023 = ~1500 Lux) with `CircuitPlayground.lightSensor()`

# Circuit Playground Lesson #0

## Sound Sensor

![](https://cdn-learn.adafruit.com/assets/assets/000/034/015/medium800/circuit_playground_sound.jpg?1468892066)

A thin&nbsp;[MEMS microphone](https://en.wikipedia.org/wiki/Microphone#MEMS_microphone) can be used to detect audio levels and even perform basic FFT functions. You can read the analog voltage corresponding to the audio on analog pin **#A4**. Note that this is the raw analog audio waveform! When it's silent there will be a reading of ~330 and when loud the audio will read between 0 and 800 or so. Averaging and smoothing must be done to convert this to sound-pressure-level.

The microphone is sensitive to 100 Hz - 10,000 Hz audio frequencies. [See the datasheet for more details.](https://cdn-shop.adafruit.com/product-files/3000/SPW2430HR5H-B.pdf)

# Library Reference

You can read the raw analog value from the amplified microphone with `CircuitPlayground.soundSensor()` this will give you just a value from between -1023 and 1023 where the default 'quiet' reading is 0. However, we don't really recommend using this, because its slow and gives you only a single point.

Chances are you want to measure overall volume. In which case, call&nbsp;`CircuitPlayground.mic.soundPressureLevel(time)` to get a "Sound Pressure Level" in dB. This will range from maybe ~50 dB (quiet) to 100dB (loud!) The **_time_** argument should be number of milliseconds to listen before performing the calculations, 10 is a good place to start.

If you do need a lot of audio values, you can call `CircuitPlayground.mic.capture(int16_t *buf, uint16_t nSamples)` with a pre-allocated array of int16\_t's and the number of samples to capture, this is if you want to get raw values only. On AVR Circuit Classic you'll sample at 10KHz, on Express its 22KHz

# Circuit Playground Lesson #0

## Mini Speaker

![](https://cdn-learn.adafruit.com/assets/assets/000/034/016/medium800/circuit_playground_buzz.jpg?1468894358)

You can make your circuit playground sing with the built in buzzer. This is a miniature magnetic speaker connected to digital pin **#5** with a transistor driver. It is quite small but can beep with conviction! It's not good for playing detailed audio, more for beeping and buzzing and simple bleepy tunes.

The driver circuitry is an on/off transistor driver, so you will only be able to play square waves. It is also not the same loudness over all frequencies but is designed to be the loudest at around 4 KHz. [See the datasheet for some more details](https://cdn-shop.adafruit.com/product-files/3000/speakerdata.jpg)

# Library Reference

You can play basic square wave beeps/tones with `CircuitPlayground.playTone(frequency, duration_ms)`. Where _frequency_ is the frequency in Hertz and _duration_ is the time to play the beep for, in millisecods.

That means `CircuitPlayground.playTone(440, 500)` will play 440 Hz (middle A) for 500 milliseconds (half of a second). The call will take the amount of time that it takes to play the tone, so if you have a duration of, say, 5000 milliseconds your Circuit Playground will spend 5 seconds playing a tone and won't be doing anything else.

# Circuit Playground Lesson #0

## Accelerometer

![](https://cdn-learn.adafruit.com/assets/assets/000/034/017/medium800/circuit_playground_accel.jpg?1468895016)

There is a powerful MEMS accelerometer in the very center of your Circuit Playground. This part is the LIS3DH, a 3-axis (X, Y and Z) sensing accelerometer. Accelerometers are the sensors in your WiiMote, phone, and other electronic devices that can sense tilt, gravity, motion and 'tap' effects. These sensors used to cost $20 each but now are so common we can include them for beginners!

The sensor can sense&nbsp;±2_g_, 4_g_, 8_g_ (_g_ = 9.8 meters/s<sup>2</sup>). Of course, at all times on earth you will sense 1 _g_ of gravity!

The LIS3DH is connected to the hardware SPI pins (to leave the I2C pins free) and has the chip select (CS) pin on digital pin **#8** and an optional interrupt output on digital pin **#7** (also known as IRQ #4)

# Library Reference

### Motion in X Y and Z

You can ask the sensor for the amount of _g_ detected in X, Y and Z directions. Positive values mean acceleration in the direction of the arrow on the silkscreen. For X that means towards the USB jack. For Y that is to the left. For Z that is straight up pointing towards you when looking at the circuit board.

`CircuitPlayground.motionX()`, `CircuitPlayground.motionY()`, `CircuitPlayground.motionZ()` will each return a floating point value.

### Setting Accelerometer Range

You can change the range, a smaller range (±2_g_) will give more precision. Larger ranges (±8_g_) can sense greater forces. You can set it whenever you like using `CircuitPlayground.setAccelRange(range)` where range can be `LIS3DH_RANGE_2_G`, `LIS3DH_RANGE_4_G` or `LIS3DH_RANGE_8_G`

### Tap Detection

You can turn on tap detection by calling `CircuitPlayground.setAccelTap(taps, threshhold)`

Tap detection can detect single taps or 'double taps' (like a double-click). If _taps_ is 1 you will only detect single taps, one at a time. If _taps_ is 2, you will be able to detect both single taps and double taps.

You can detect taps in real time by calling `CircuitPlayground.getAccelTap()`. It will return 0 if no tap is detected, 1 if a single tap is detected, and 2 or 3 if double tap is detected.

The problem with that is you need to query it within about 100 milliseconds of the tapping, which can be difficult to do. If you are comfortable with interrupts you can use the interrupt output to have a function called when a tap is detected: `attachInterrupt(digitalPinToInterrupt(7), myfunction, RISING)` will call _myfunction_ whenever the tap or doubletap occurs.

# Circuit Playground Lesson #0

## Alligator Pads & Pinout

Info: 

![](https://cdn-learn.adafruit.com/assets/assets/000/033/966/medium800/circuit_playground_allig.jpg?1468722172)

There are 14 total Alligator Pads on the outside of the Circuit Playground. These are for you when you want to add more sensors or circuitry without the need for soldering. Use any kind of alligator clip (the small ones work best but any size should be able to grip onto the pads)

[You can pick up a pack of 12 clips from Adafruit](https://www.adafruit.com/products/1008)

![circuit_playground_allipack.jpg](https://cdn-learn.adafruit.com/assets/assets/000/033/968/medium640/circuit_playground_allipack.jpg?1468722319)

# Capacitive Touch

All 8 non-power pads (e.g. not the GND/3.3V/VBATT) around the Circuit Playground have the ability to act as capacitive touch pads. Each pad has a 1 MΩ resistor between it and digital pin #30. You can toggle this pin in your sketch to control whether the resistor is a pullup or pulldown or floating. Note that this means that all the pads have a 2 MΩ resistance between them, not important for 99% of uses but may be confusing for some cases where you are trying to detect very high resistance values

### Library Reference

You can get the capacitance reading from a pin using `CircuitPlayground.readCap(pin)` and just set the _pin_ to any of the pad #'s next to the pad (e.g. 0, 1, 2, 3, 6, 9, 10 and 12) The number returned will vary from about 0 to about 1000. Any reading above approximately 50 will correspond to a touch, but it does depend a bit on what material and length is connected to the pin so you will need to adjust your code based on your setup.

# Pad Usage (pinout)

We'll use terminology like analog inputs, PWM outputs, interrupts, I2C, UART etc. We'll cover all this later, just know you can use this list for reference!

# Left Side

Starting from the Micro USB jack and going clockwise here are what the pins do.

- **3.3V** - this is the _output_ from the onboard 3.3V power supply. This is the main power voltage for the 'Play but can also be used to power sensors, GPS or bluetooth modules, etc. You can draw a maximum of 500mA. See the **Battery Jack & Supply** page for more details
- **#10** - this is connected to the microcontroller's pin #10. This pin can also be used for _analog inputs_ and is called **A10**. It can also act as a **PWM** output.
- **#9** - this is connected to the microcontroller's pin #9. This pin can also be used for _analog inputs_ and is called **A9**. It can also act as a **PWM** output.
- **GND** - shorthand for **Ground** you'll need to this when powering or connecting to external devices.
- **#6** - this is connected to the microcontroller's pin #6. This pin can also be used for _analog inputs_ and is called **A7**. It can also act as a **PWM** output.
- **#12** - this is connected to the microcontroller's pin #12. This pin can also be used for _analog inputs_ and is called **A11**. It can also act as a **PWM** output.
- **VBATT** - this is the battery voltage _output_ from whichever is higher: the JST battery pack or USB. _It cannot be used as a power input!_ It is designed to power high-current or high-voltage devices that need more like 5V than 3.3V. If connected to USB, this pin provides 5V. If powered from battery, the output voltage will vary depending on the battery pack.

# Right Side

Starting from the Micro USB jack and going counter-clockwise here are what the pins do.

- **GND** - Same as the other **Ground** pins
- **SCL #3** - This is a special-purpose pin. It is connected to the microcontroller's pin #3. This pin can also act as a **PWM** output and an **interrupt** input (INT0). The other special usage is connecting to I2C sensors and devices, as the I2C Clock pin
- **SDA #2** - This is a special-purpose pin. It is connected to the microcontroller's pin #2. This pin can also act as a **PWM** output and an **interrupt** input (INT1). The other special usage is connecting to I2C sensors and devices, as the I2C Data pin
- **3.3V** - Same as the other **3.3V** power supply pins
- **RX #0** - This is a special-purpose pin. It is connected to the microcontroller's pin #0. This pin can also act as an **interrupt** input (INT2). The other special usage is connecting to UART/Serial sensors and devices, as the Data Receive (RX) pin.
- **TX #1** - This is a special-purpose pin. It is connected to the microcontroller's pin #1. This pin can also act as an **interrupt** input (INT3). The other special usage is connecting to UART/Serial sensors and devices, as the Data Transmit (TX) pin.
- **GND** - Same as the other **Ground** pins

# Circuit Playground Lesson #0

## Power Up Test

Now we are ready for the moment of truth, it's time to plug your Circuit Playground in and power it up. The easiest way to do this is to plug one end of the USB cable into the 'Play and the other end into a computer. The computer will then power the Circuit Playground.

You'll need a USB cable with a slim Micro B-type end:

![](https://cdn-learn.adafruit.com/assets/assets/000/034/018/medium800/circuit_playground_microusbconn.jpg?1468901673)

Make sure that the USB cable is plugged in directly to a computer port. Sometimes monitors or keyboards have a USB port you can plug into. Most of the time this is fine, but I strongly suggest you plug it directly into the computer as that will eliminate any possible problems. Same goes for USB hubs - skip those for now and go direct

Later on, once you've verified you can power the Circuit Playground and upload sketches no problem, then you can try plugging it into other ports.

OK anyways, so plug int he USB cable and check that your board looks like this:

![](https://cdn-learn.adafruit.com/assets/assets/000/034/019/medium800/circuit_playground_onled.jpg?1468902011)

In particular, make sure the green **ON** LED is lit!

If this is the first time you're plugging in your Circuit Playground fresh from the factory, the red **L** LED and and NeoPixels might also be lit or blinking - this is normal.

![](https://cdn-learn.adafruit.com/assets/assets/000/034/020/medium800thumb/circuit_playground_anim.jpg?1468902212)

If no lights or blinking occurs, double check:

- Is the USB cable plugged into the computer and into the Circuit Playground?
- Try another USB cable
- Check there's nothing metallic touching the&nbsp;Circuit Playground that could be _shorting out_ the device
- Is the computer on?
- Try another USB port, USB cable, and computer?

If you still can't get it working, your&nbsp;Circuit Playground may be faulty and need replacement!

# Bootloader Reset Test

Next up, you can do a quick **bootloader test** - this will let you know that the Circuit Playground chip has been programmed with a bootloader which is required!

While powered, double click the **Reset button** - you will see the **#13** red LED breathe/pulse on and off. It will pulse about 10 times, once per second

![](https://cdn-learn.adafruit.com/assets/assets/000/034/022/medium800thumb/circuit_playground_bootloader.jpg?1468903442)

If you get both the green **ON** LED lit and the red **#13** LED to pulse you are well on your way and have passed the power up test!

# Circuit Playground Lesson #0

## Download Software

To get you all set up, start by installing the **Arduino IDE Software**

This is the free application you'll use to write programs and talk to your Arduino or compatible. Did we mention it is free? How awesome is that?

You can download Arduino from

**[https://www.arduino.cc/en/Main/Software](https://www.arduino.cc/en/Main/Software)**

Warning: 

When you visit the Arduino site you'll see a section like this:

![](https://cdn-learn.adafruit.com/assets/assets/000/033/476/medium800/arduinodl.png?1467169632)

The Arduino software is under constant revision. As of this writing, the version available is 1.6.9 but you may have a more recent version. Just grab whatever is the most recent

## Windows

Download and install with the **Installer.** The Zip file (non-admin install) is not recommended unless you cannot run the installer

## Mac

Download and drag the Application out of the compressed folder.

## Linux

Available for 32-bit or 64-bit Linux, once you download you will need to manually decompress and install

## Raspberry Pi and other ARM-based Linux

There's a new version you can use that is compiled for ARM processors! It works on the Raspberry Pi and will likely work on any other ARM core Linux

# Circuit Playground Lesson #0

## Install Software (Windows)

# Installing Arduino

Visit **arduino.cc** to download the latest version of Arduino

![](https://cdn-learn.adafruit.com/assets/assets/000/034/023/medium800/circuit_playground_arduinodl.png?1468903704)

Click on the **Windows Installer** link to download the installer, then double click to launch it

![](https://cdn-learn.adafruit.com/assets/assets/000/034/024/medium800/circuit_playground_opening.png?1468903711)

You may get a warning asking if you're sure you want to run the installer. It's ok, click **YES**

![](https://cdn-learn.adafruit.com/assets/assets/000/034/025/medium800/circuit_playground_control.png?1468903725)

There is an open source license to click through. Install in the default location

![](https://cdn-learn.adafruit.com/assets/assets/000/034/026/medium800/circuit_playground_arduino_dest.png?1468903751)

You can use the default setup installation options

![](https://cdn-learn.adafruit.com/assets/assets/000/034/027/medium800/circuit_playground_arduino_setup.png?1468903768)

Finally it will take a minute or two to install

![](https://cdn-learn.adafruit.com/assets/assets/000/034/028/medium800/circuit_playground_arduino_installing.png?1468903782)

When done you'll have the software installed

![](https://cdn-learn.adafruit.com/assets/assets/000/034/029/medium800/circuit_playground_arduino_duinoicon.png?1468903810)

# Circuit Playground Driver (Windows 7 Only)

You will need to install separate drivers for the Circuit Playground board

For all Adafruit compatibles, we have an _all in one_ installer that will install all of the Adafruit board drivers

Click below to download our Driver Installer

[Download Adafruit Boards Windows Driver Installer v2.0.0.0](https://github.com/adafruit/Adafruit_Windows_Drivers/releases/download/2.0.0.0/adafruit_drivers_2.0.0.0.exe)
Download and run the installer

![](https://cdn-learn.adafruit.com/assets/assets/000/034/030/medium800/circuit_playground_arduino_flora_1download.png?1468903856)

Run the installer! Since we bundle the SiLabs and FTDI drivers as well, you'll need to click through the license

![](https://cdn-learn.adafruit.com/assets/assets/000/034/031/medium800/circuit_playground_arduino_flora_2lic.png?1468903874)

Select which drivers you want to install (we suggest selecting all of them so you never have to worry about installing drivers when you start to explore other Arduino-compatibles)

![](https://cdn-learn.adafruit.com/assets/assets/000/046/678/medium800/circuit_playground_driver-installer-v2000.png?1505790391)

Click **Install** to do the installin'

![](https://cdn-learn.adafruit.com/assets/assets/000/034/033/medium800/circuit_playground_arduino_flora_4complete.png?1468903969)

You should not need to restart your computer but it's not a _bad_ idea!

# Find your Serial (COM) Port

To verify your Arduino driver installed properly, plug it into USB and open up the **Device Manager**. You can find the Device Manager in the **Control Panel** (search for Device Manager)

![](https://cdn-learn.adafruit.com/assets/assets/000/034/034/medium800/circuit_playground_arduino_devicemanager.png?1468903997)

When you open the Device Manager, find the section called **Ports** and expand it:

![](https://cdn-learn.adafruit.com/assets/assets/000/034/035/medium800/circuit_playground_cirplaydri.png?1468904047)

You'll see an icon next to some text that says **Adafruit Circuit Playground (COMxx)** where **xx** is a number

The COM number may vary but it should be something like **COM3** or **COM4**. The COM stands for "communication", and each one has a unique number, known as the COM Port number. In this case the COM Port number is COM18.

You can unplug your 'Play to see the COM port device disappear and re-appear when plugged in.

If you **don't** see the Circuit Playground show up, check:

- Is your cable a data cable or charge only? Try another USB cable
- Try another USB port!
- Verify you installed the drivers, you can always try installing them again (never hurts) and rebooting

# Circuit Playground Lesson #0

## Install Software (Mac OS X)

# Installing Arduino

Visit **arduino.cc** to download the latest version of Arduino

![](https://cdn-learn.adafruit.com/assets/assets/000/034/036/medium800/circuit_playground_arduinodl.png?1468904129)

Click on the **Mac OS X Installer** link to download the installer

![](https://cdn-learn.adafruit.com/assets/assets/000/034/037/medium800/circuit_playground_arduino_screenshot_01.png?1468904141)

Then double click to expand/launch it

![](https://cdn-learn.adafruit.com/assets/assets/000/034/038/medium800/circuit_playground_arduino_expanding.png?1468904165)

it will automatically give you the **Arduino app** the teal icon:

![](https://cdn-learn.adafruit.com/assets/assets/000/034/039/medium800/circuit_playground_arduino_icon.png?1468904192)

# No Drivers To Install!

Thanks to Mac OS X having the drivers built in, you won't need to install any other software!

# Find your Serial Port Device

You can use **Terminal** to help find and verify your Arduino. First, launch the **Terminal** app - you can Command-F to Find the **Terminal.app** program:

![](https://cdn-learn.adafruit.com/assets/assets/000/034/040/medium800/circuit_playground_arduino_terminal.png?1468904267)

Double click to launch it. At the text prompt, type in `ls /dev/cu*` (note the first letter is a lower-case L)

![](https://cdn-learn.adafruit.com/assets/assets/000/034/041/medium800/circuit_playground_arduino_lstty.png?1468904282)

Make sure you see a line with the text **/dev/cu.usbmodem_xxxx_** or **/dev/cu.usbserial-_xxxxx_** where the xxx's can be anything. This indicates that the driver installed properly and that the Circuit Playground was found.

You can close the Terminal program now

# Circuit Playground Lesson #0

## Install Software (Linux)

# Installing Arduino

Visit **arduino.cc** to download the latest version of Arduino

![](https://cdn-learn.adafruit.com/assets/assets/000/034/042/medium800/circuit_playground_arduinodl.png?1468904343)

Warning: 

Click on the matching **Linux Installer** link (32 bit, 64 bit or ARM) to download the installer - save the file to your Downloads folder

![](https://cdn-learn.adafruit.com/assets/assets/000/034/043/medium800/circuit_playground_arduino_download.png?1468904355)

From within your Terminal program, **cd** to the Downloads directory, and untar the package with **tar xf arduino\*.xz** then **cd** into the **arduino-n.n.n** folder created:

![](https://cdn-learn.adafruit.com/assets/assets/000/034/044/medium800/circuit_playground_arduino_untar.png?1468904389)

Run **./install.sh** to install the software. I've got an old Ubuntu install so I got warnings, but it did create that desktop icon for me!

![](https://cdn-learn.adafruit.com/assets/assets/000/034/045/medium800/circuit_playground_arduino_install.png?1468904429)

# Driver Installation

Linux doesn't have any drivers to install, assuming you're running a v2.6 kernel or higher, which is almost certainly true. These instructions assume you're running Ubuntu. Each Linux distribution is different, but the instructions should be basic enough to follow for other distros.

You can verify your kernel version by running **uname -a** in a terminal window, note that this kernel is version **2.6.20**

![](https://cdn-learn.adafruit.com/assets/assets/000/034/046/medium800/circuit_playground_arduino_uname.png?1468904446)

And this one is **3.2.0-23**

![](https://cdn-learn.adafruit.com/assets/assets/000/034/047/medium800/circuit_playground_arduino_lin32.png?1468904487)

Some older Linux distributions used to install **brltty** (braille device) which will conflict with the serial port. You **must uninstall brltty if it is installed!** Do so by running `sudo apt-get remove brltty `or equivalent In a terminal window. If it says it's not installed then thats OK. If you're not running a Debian-derived installation use whatever tool is necessary to verify that you don't have **brltty** running

# Verify your Serial Port

Plug in the Circuit Playground, verify that the green LED is lit, and type **ls /dev/ttyUSB\*** into a terminal window, you should see a device file called something like ttyUSB0

![](https://cdn-learn.adafruit.com/assets/assets/000/034/048/medium800/circuit_playground_arduino_lstty.png?1468904535)

If you can't seem to find it, use **dmesg | tail** right after plugging in the Circuit Playground and look for hints on where it may put the device file. For example here is says **Serial Device converter now attached to ttyUSB0**

If you see something like this

`[1900.712000] ftdi_sio 2-10:1.0: FTDI USB Serial Device converter detected[1900.712000] drivers/usb/serial/ftdi_sio.c: Detected FT232BM[1900.712000] usb 2-10: FTDI USB Serial Device converter now attached to ttyUSB0[1901.868000] usb 2-10: usbfs: interface 0 claimed by ftdi_sio while 'brltty' sets config #1 [1901.872000] ftdi_sio ttyUSB0: FTDI USB Serial Device converter now disconnected from ttyUSB0 [1901.872000] ftdi_sio 2-10:1.0: device disconnected`

That means you have not uninstalled **brltty** and you should try again.

## Linux Issues
Info: 

```
sudo apt purge modemmanager
```

# Circuit Playground Lesson #0

## Set Up & Test Arduino

The Circuit Playground Classic is 'natively' supported in the Arduino IDE so its **really easy** to set up!

# Download Latest Arduino IDE

Download the latest Arduino IDE, **version 1.8.5 or greater** is required!

You can also use Arduino Create, in which case the IDE is already the latest version

[Download Arduino IDE](https://www.arduino.cc/en/Main/Software)
# Install Drivers (Windows 7 Only)

When you plug in the board, you'll need to possibly install a driver

[Click here to download our Driver Installer](../../../../introducing-circuit-playground/windows-driver-installation)

# Blink

Now you can upload your first blink sketch!

Open up the Blink example from the Arduino IDE

![](https://cdn-learn.adafruit.com/assets/assets/000/047/517/medium800/classic_blink.png?1508710488)

Select **Circuit Playground** from the Tools -\> Board dropdown menul

![](https://cdn-learn.adafruit.com/assets/assets/000/047/518/medium800/classic_cpboard.png?1508710518)

Plug in the Circuit Playground and wait for it to be recognized by the OS (just takes a few seconds). It will create a serial/COM port, you can now select it from the dropdown, it'll even be 'indicated' as a Circuit Playground board!

![](https://cdn-learn.adafruit.com/assets/assets/000/047/516/medium800/classic_cpport.png?1508710398)

And click upload! That's it, you will be able to see the LED blink rate change as you adapt the **delay()** calls.

Info: 

# Manually bootloading

Once it is in bootloader mode, you can select the newly created COM/Serial port and re-try uploading.

If you ever get in a 'weird' spot with the bootloader, or you have uploaded code that crashes and doesn't auto-reboot into the bootloader, click the **RESET** button **twice** (like a double-click) to get back into the bootloader.

**The red LED will pulse so you know that its in bootloader mode.**

In the Arduino IDE, **re-select the Serial Port** to the new port that has been created for the bootloader.

Then upload **Blink** - make sure that works!

Once that works, go back and re-select the 'normal' USB serial port next time you want to use the normal upload.

# Ubuntu&nbsp;& Linux Issue Fix

Note if you're using Ubuntu 15.04 (or perhaps other more recent Linux distributions) there is an issue with&nbsp;the modem manager service which causes the Bluefruit LE micro to be difficult to program. &nbsp;If you run into errors like "device or resource busy", "bad file descriptor", or "port is busy" when attempting to program then [you are hitting this issue.](https://bugs.launchpad.net/ubuntu/+source/modemmanager/+bug/1473246)

The fix for this issue is to make sure Adafruit's custom udev rules are applied to your system. &nbsp;One of these rules is made to configure modem manager not to touch the Feather board and will fix the programming difficulty issue. &nbsp;[Follow the steps for installing Adafruit's udev rules on this page.](../../../../adafruit-arduino-ide-setup/linux-setup#udev-rules)

# Circuit Playground Lesson #0

## Circuit Playground Library

We wrapped up everything you need to run Arduino code on your Circuit Playground is wrapped up into a tidy library that integrates all the sensing and lighting.

# Installing Via Library Manager

The Circuit Playground library is available on the [Adafruit GitHub website](https://github.com/adafruit/Adafruit_CircuitPlayground). but what's nice is that Arduino IDE comes with a version of the library and its super easy to update.

Info: 

&nbsp;In the menubar click "Sketch", then "Include Library"

&nbsp;

At the top, click "Manage Libraries. . ."

![classic_lib.png](https://cdn-learn.adafruit.com/assets/assets/000/047/522/medium640/classic_lib.png?1508711506)

Search for&nbsp; **Adafruit Circuit Playground** &nbsp;library and click **Update** to get the very latest version!

![](https://cdn-learn.adafruit.com/assets/assets/000/084/026/medium800/adafruit_products_circuit_playground.png?1573518753)

# Run the Demo

Now that you have the library installed you can continue.

[Follow the Arduino Set Up guide page to make sure you can **Blink** upload.](../../../../introducing-circuit-playground/set-up-test-arduino)Once that's known to work, come back here.

## Select the Circuit Playground Board

Under the **Tools -\> Board** submenu, pick **Adafruit Circuit Playground**

![](https://cdn-learn.adafruit.com/assets/assets/000/047/519/medium800/classic_cpboard.png?1508710826)

## Select the matching Port

Under **Tools-\>Port** select the port that is labeled (Circuit Playground)

![](https://cdn-learn.adafruit.com/assets/assets/000/047/520/medium800/classic_cpport.png?1508710850)

## Load the Demo Program

OK you're now ready to load the demo. Under **File-\>Examples** locate **Adafruit Circuit Playground** and then select the **demo** program.

![](https://cdn-learn.adafruit.com/assets/assets/000/047/521/medium800/classic_demo.png?1508710921)

## Compile/Verify the Demo

Click the **Verify** button (also the **Sketch-\>Verify** menu item) to compile/verify the demo. Make sure you get " **Done compiling."** and no errors

![](https://cdn-learn.adafruit.com/assets/assets/000/031/950/medium800/circuit_playground_democompile.png?1461622665)

## Upload Demo

Click the Upload button to upload the code

![](https://cdn-learn.adafruit.com/assets/assets/000/031/951/medium800/circuit_playground_upload.png?1461622766)

You should get a **Done uploading.** message in the blue statusbar

![](https://cdn-learn.adafruit.com/assets/assets/000/031/952/medium800/circuit_playground_uploaded.png?1461622795)

You can now run the serial console to get data output:

![](https://cdn-learn.adafruit.com/assets/assets/000/031/954/medium800/circuit_playground_output.png?1461622953)

You'll get information such as:

- "Capacitive touch" readings for all 8 outer pads (under 50 means not touched, over 100 usually means the pads are touched)
- Slide switch location (left or right)
- If the Right and Left buttons are pressed
- Light sensor readings, higher values mean more light
- Sound sensor readings
- X, Y and Z accelerometer readings
- Temperature in Celsius

# Circuit Playground Lesson #0

## Library Reference

[Thanks to caternuson for this reference while we work on this page](https://caternuson.github.io/Adafruit_CircuitPlayground/)

# Circuit Playground Lesson #0

## CircuitPlayground Class Reference

# Circuit Playground Lesson #0

## Speaker Class Reference

# Circuit Playground Lesson #0

## Mic Class Reference

# Circuit Playground Lesson #0

## Accel Class Reference


## Featured Products

### Circuit Playground Classic

[Circuit Playground Classic](https://www.adafruit.com/product/3000)
Would you like to learn electronics, with an all-in-one board that has sensors and LEDs built in? **Circuit Playground** is here - and it's the best way to practice programming on real hardware with no soldering or sewing required!

This is the **Classic**...

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

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

Approximately 3 feet / 1 meter long

In Stock
[Buy Now](https://www.adafruit.com/product/592)
[Related Guides to the Product](https://learn.adafruit.com/products/592/guides)
### 3 x AAA Battery Holder with On/Off Switch and 2-Pin JST

[3 x AAA Battery Holder with On/Off Switch and 2-Pin JST](https://www.adafruit.com/product/727)
This battery holder connects 3 AAA batteries together in series for powering all kinds of projects. We spec'd these out because the box is slim, and 3 AAA's add up to about 3.3-4.5V, a very similar range to Lithium Ion/polymer (Li-Ion) batteries and have an on-off switch. That makes...

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

[Alkaline AAA batteries - 2 pack](https://www.adafruit.com/product/617)
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 AAA's.&nbsp;This is a pack of **2&nbsp;AAA batteries**.  
  
These batteries are Alkaline (MnO2) chemistry,...

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

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

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

## Related Guides

- [Introducing Circuit Playground](https://learn.adafruit.com/introducing-circuit-playground.md)
- [Dotstar LED and Glass Pebble Floor](https://learn.adafruit.com/neopixel-and-glass-pebble-floor.md)
- [Circuit Playground Class Scheduler](https://learn.adafruit.com/circuit-playground-class-scheduler.md)
- [Circuit Playground D6 Dice](https://learn.adafruit.com/circuit-playground-d6-dice.md)
- [Glowing Beehive Hairdo Wig](https://learn.adafruit.com/glowing-beehive-hairdo-wig.md)
- [Circuit Playground Beep Beep](https://learn.adafruit.com/circuit-playground-beep-beep.md)
- [Circuit Playground Simple Simon](https://learn.adafruit.com/circuit-playground-simple-simon.md)
- [NeoAnim: Using Bitmaps to Animate NeoPixels on Circuit Playground](https://learn.adafruit.com/circuit-playground-neoanim-using-bitmaps-to-animate-neopixels.md)
- [Circuit Playground Quick Draw](https://learn.adafruit.com/circuit-playground-quick-draw.md)
- [Case for Circuit Playground](https://learn.adafruit.com/case-for-circuit-playground.md)
- [How Tall Is It?](https://learn.adafruit.com/how-tall-is-it.md)
- [Circuit Playground Password Vault](https://learn.adafruit.com/circuit-playground-password-vault.md)
- [Circuit Playground Bike Glove](https://learn.adafruit.com/circuit-playground-bike-glove.md)
- [Wonder Woman Cosplay Bracers](https://learn.adafruit.com/wonder-woman-cosplay-bracers.md)
- [Circuit Playground Kaleidoscope](https://learn.adafruit.com/circuit-playground-kaleidoscope.md)
- [Glowing Smokey Skull ](https://learn.adafruit.com/glowing-smokey-skull.md)
