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)

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

Who are you?

Great question. This is me:

Temporarily unable to load embedded content:
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!

About This Lesson

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!

Lesson Parts

Required:

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

Available at Adafruit

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

 

Make sure its a data/sync cable!

 

USB cable available at Adafruit

A HUUUUUUGE number of people have problems because they pick a 'charge only' USB cable rather than a "Data/Sync" cable. Make 100% sure you have a good quality syncing cable. Srsly, I can't even express how many times students have nearly given up due to a flakey USB cable!

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.

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!

Take a Tour!

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

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:

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:

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.

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

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!

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

There's a lot of other companies and groups that may try to get you to download the Arduino software but it could have viruses or malware. Only download from arduino.cc !

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

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

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

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

Blink

Now you can upload your first blink sketch!

Open up the Blink example from the Arduino IDE

Select Circuit Playground from the Tools -> Board dropdown menul

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!

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

If you are having issues, make sure you selected the matching Board in the menu that matches the hardware you have in your hand.

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 & Linux Issue Fix

Note if you're using Ubuntu 15.04 (or perhaps other more recent Linux distributions) there is an issue with the modem manager service which causes the Bluefruit LE micro to be difficult to program.  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.

The fix for this issue is to make sure Adafruit's custom udev rules are applied to your system.  One of these rules is made to configure modem manager not to touch the Feather board and will fix the programming difficulty issue.  Follow the steps for installing Adafruit's udev rules on this page.

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. but what's nice is that Arduino IDE comes with a version of the library and its super easy to update.

We recommend updating the library even if you just installed the Arduino IDE, we have constant updates!

 In the menubar click "Sketch", then "Include Library"

 

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

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

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. Once that's known to work, come back here.

Select the Circuit Playground Board

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

Select the matching Port

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

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.

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

Upload Demo

Click the Upload button to upload the code

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

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

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

Library Reference

This guide was first published on Jul 19, 2016. It was last updated on Jul 19, 2016.