# Interactive Map with Circuit Playground Express

## Overview

https://youtu.be/AsUOzt6whw4

This project shows how to make a talking map, allowing the history contained within a map to be tangible and interactive.&nbsp;

Using conductive paint, a [Circuit Playground Express](https://learn.adafruit.com/adafruit-circuit-playground-express) can be connected to different points on a map and provided with short audio clips to play when those areas on the map are touched.&nbsp;

## Parts
The Circuit Playground Express can connect to externally powered speakers via the audio jack, allowing you to play audio from the board at your preferred volume.&nbsp;

Adafruit's USB powered speakers are excellent for this purpose, though you are welcome to use your own too.

### Circuit Playground Express

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

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

### USB Powered Speakers

[USB Powered Speakers](https://www.adafruit.com/product/1363)
Add some extra boom to your audio project with these powered loudspeakers. We sampled half a dozen different models to find ones with a good frequency response, so you'll get quality audio output for music playback. Simply connect the standard 3.5mm stereo plug into your Raspberry Pi model...

In Stock
[Buy Now](https://www.adafruit.com/product/1363)
[Related Guides to the Product](https://learn.adafruit.com/products/1363/guides)
![Two square-ish USB Powered Speakers](https://cdn-shop.adafruit.com/640x480/1363-07.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)

### 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)
![Front angled shot of 3 x AAA battery holder with on-off switch and 2-pin JST PH connector.](https://cdn-shop.adafruit.com/640x480/727-07.jpg)

### Alkaline AAA batteries - 3 pack

[Alkaline AAA batteries - 3 pack](https://www.adafruit.com/product/3520)
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. This is a pack of **3 AAA batteries**.  
  
These batteries are Alkaline (MnO2) chemistry, with a...

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

## Materials

- Printer & paper
- Scrap cardboard
- Scissors or hobby knife
- Double sided tape

# Interactive Map with Circuit Playground Express

## Make your Map

This [map of NYC](http://maps.nypl.org/warper/maps/23217), courtesy of the New York Public Library, shows a large section of NYC is great detail, with helpful neighborhood indicators.&nbsp;

Print out the PDF below, or use another map as per the goals of your specific project.

[Download the NYC Map](https://cdn-learn.adafruit.com/assets/assets/000/067/069/original/NYC_neighborhoods.pdf)
![](https://cdn-learn.adafruit.com/assets/assets/000/067/290/medium800/circuitpython_IMG_0796.jpg?1544201738)

A good foundation is always important at the start of a project. Begin by glueing the printed map onto a piece of scrap cardboard.&nbsp;

![](https://cdn-learn.adafruit.com/assets/assets/000/067/128/medium800/circuitpython_IMG_9903.jpg?1544123607)

Warning: 

Cut around the outline of the map.

&nbsp;

Use scissors or a hobby knife to do this.

![circuitpython_IMG_9904.jpg](https://cdn-learn.adafruit.com/assets/assets/000/067/125/medium640/circuitpython_IMG_9904.jpg?1544123397)

![circuitpython_IMG_9905.jpg](https://cdn-learn.adafruit.com/assets/assets/000/067/126/medium640/circuitpython_IMG_9905.jpg?1544123430)

Mark some locations on the map which you would like to highlight.

![](https://cdn-learn.adafruit.com/assets/assets/000/067/122/medium800/circuitpython_KUYA4303.jpg?1544123351)

There are seven available capacitive touch pads on the Circuit Playground Express (the eighth analog pad, **A0** , is used for audio output).

This provides you with seven possible locations on your map to highlight.

## Electric Paint

Once you've chosen your locations, you can use Bare Conductive's electric paint to draw connections to the capacitive touch pads on Circuit Playground Express.

![](https://cdn-learn.adafruit.com/assets/assets/000/067/292/medium800thumb/circuitpython_Untitled.2018-12-07_13_19_53.jpg?1544206920)

## No Overlapping Lines

Think carefully about where you position the board on the map so that you can connect all the point on your map to it without any of them overlapping.

The lines don't have to be perfect, as long as they don't cross!

![](https://cdn-learn.adafruit.com/assets/assets/000/067/293/medium800/circuitpython_IMG_0801.jpg?1544207133)

# Interactive Map with Circuit Playground Express

## Prepare Audio Files

![](https://cdn-learn.adafruit.com/assets/assets/000/067/315/medium800/circuitpython_blinka-Music.jpg?1544214050)

For this map, we've chosen an assortment of music clips that are tied to specific locations around the city.

1. Wu Tang Clan - C.R.E.A.M. - Stapleton, Staten Island
2. Woody Guthrie - This Land is Your Land - 3520 Mermaid Ave. Coney Island
3. Jay-Z - Empire State of Mind - 560 State St. Brooklyn, NY
4. Notorious B.I.G. - Hypnotize - 226 St. James Pl. Brooklyn, NY
5. Frank Sinatra - My Way -&nbsp;417 Monroe St, Hoboken, NJ 07030
6. John Lennon - Strawberry Fields - The Dakota&nbsp;1 W 72nd St, New York, NY 10023&nbsp;
7. Louis Armstrong - What a Wonderful World - 34-56 107th St, Corona, NY 11368

For all of these artists, the locations chosen for this project played an important role in their life, either as a place of residence, childhood home, or a location mentioned in their lyrics.

## Choose your own

You can adapt existing audio files from your computer for use in this project, or audio clips can be downloaded from sites like&nbsp;[http://soundbible.com/](http://soundbible.com/)&nbsp;or&nbsp;[https://freesound.org/](https://freesound.org/).&nbsp;

You will need to convert the files to the appropriate format for microcontroller use.&nbsp;[See this guide on how to convert audio files](https://learn.adafruit.com/microcontroller-compatible-audio-file-conversion/check-your-files).&nbsp;

Your audio files must be named&nbsp; **01.wav** ,&nbsp; **02.wav** , etc. so all filenames are two digits.&nbsp;

## No Mix & Match on mono and stereo files

Make sure your audio files are exported as **&nbsp;16-bit PCM WAV** &nbsp;at&nbsp; **22,050 Hz** &nbsp;and they are&nbsp; **all Stereo** &nbsp;or&nbsp; **all Mono** &nbsp;-_no mix and match_!

# Interactive Map with Circuit Playground Express

## CircuitPython Code

![](https://cdn-learn.adafruit.com/assets/assets/000/067/317/medium800/makecode_circuitpython_circuit_playground_adafruit_blinka_computer.png?1544214207)

## Getting Familiar

CircuitPython is a programming language based on Python, one of the fastest growing programming languages in the world. It is specifically designed to simplify experimenting and learning to code on low-cost microcontroller boards.

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

If you haven't used Circuit Playground Express and CircuitPython together before, make sure you've updated it with the latest version of CircuitPython.&nbsp;[This guide will show you how](https://learn.adafruit.com/adafruit-circuit-playground-express/circuitpython-quickstart).

## Copy that Code!

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

Copy&nbsp; **code.py** &nbsp;from the link below and put it in&nbsp; **CIRCUITPY** &nbsp;root directory. You can work with this code in any text editing application, or open and save with&nbsp;[Mu](https://learn.adafruit.com/welcome-to-circuitpython/installing-mu-editor)&nbsp;if you prefer.&nbsp;

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

Once the code is saved to **CIRCUITPY** , drag your audio files over too. You should be able to test that they play by touching the capacitive pads, the miniature speaker on the board will play them (but for higher fidelity and more volume, connecting external speakers is recommended).

![](https://cdn-learn.adafruit.com/assets/assets/000/067/289/medium800/circuitpython_Screen_Shot_2018-12-05_at_12.32.08_PM.png?1544200721)

## Troubleshooting

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

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

&nbsp;

**Problem** : I can't hear any audio!

**Solution** : Check that your Circuit Playground Express is connected to your battery pack and the slide switch on **&nbsp;** pack is set to "ON".&nbsp;

&nbsp;

**Problem** : I STILL can't hear any audio!

**Solution** : Check that your audio files are all named correctly, 01.wav to 07.wav. Don't forget those leading zeroes!

# Interactive Map with Circuit Playground Express

## Your Interactive Map

Now it's time to put your map to work!

Because the speaker that comes on the Circuit Playground Express cannot replicate complex sounds with high fidelity, it is useful to connect externally powered speakers to better hear your audio clips.

Alligator clips connected from the **GND** and **A0** pads on CPX to the **tip** and **GND** on an audio jack (see circuit diagram) will transmit your audio to the speakers.

Follow [this guide](https://learn.adafruit.com/adafruit-circuit-playground-express/circuitpython-audio-out) for more details on playing audio through Circuit Playground Express.

![](https://cdn-learn.adafruit.com/assets/assets/000/067/299/medium800/circuitpython_circuit_playground_hp.png?1544210164)

![](https://cdn-learn.adafruit.com/assets/assets/000/067/339/medium800thumb/circuitpython_Untitled4.2018-12-07_16_23_12.jpg?1544347977)

![](https://cdn-learn.adafruit.com/assets/assets/000/067/337/medium800thumb/circuitpython_Diptic.2018-12-07_16_19_07.jpg?1544547710)

![](https://cdn-learn.adafruit.com/assets/assets/000/067/340/medium800thumb/circuitpython_IMG_9964.2018-12-07_16_28_24.jpg?1544548669)


## Featured Products

### Circuit Playground Express

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

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

[USB Powered Speakers](https://www.adafruit.com/product/1363)
Add some extra boom to your audio project with these powered loudspeakers. We sampled half a dozen different models to find ones with a good frequency response, so you'll get quality audio output for music playback. Simply connect the standard 3.5mm stereo plug into your Raspberry Pi model...

In Stock
[Buy Now](https://www.adafruit.com/product/1363)
[Related Guides to the Product](https://learn.adafruit.com/products/1363/guides)
### Bare Conductive Paint Pen - 10mL

[Bare Conductive Paint Pen - 10mL](https://www.adafruit.com/product/1306)
Bare Conductive Paint is a multipurpose electrically conductive material perfect for all of your DIY projects! Bare Paint is water based, nontoxic and dries at room temperature.  
  
Bare Paint is the first non-toxic electrically conductive paint available to consumers today. This unique...

No Longer Stocked
[Buy Now](https://www.adafruit.com/product/1306)
[Related Guides to the Product](https://learn.adafruit.com/products/1306/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)
### 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 - 3 pack

[Alkaline AAA batteries - 3 pack](https://www.adafruit.com/product/3520)
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. This is a pack of **3 AAA batteries**.  
  
These batteries are Alkaline (MnO2) chemistry, with a...

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

## Related Guides

- [Adafruit Circuit Playground Express](https://learn.adafruit.com/adafruit-circuit-playground-express.md)
- [Crawling Animatronic Hand](https://learn.adafruit.com/crawling-hand-with-cpx-and-makecode.md)
- [Cartoon Network MakeCode: Garnet's Gauntlets from Steven Universe](https://learn.adafruit.com/cartoon-network-makecode-garnets-gauntlets-from-steven-universe.md)
- [Datalogging and File Storage in MakeCode](https://learn.adafruit.com/data-logging-and-file-storage-in-makecode.md)
- [Xenomorph Halloween Candy Bucket](https://learn.adafruit.com/xenomorph-halloween-candy-bucket.md)
- [Chinese Dragon Puppet with Motion-Reactive Flame Effect](https://learn.adafruit.com/chinese-dragon-puppet-with-motion-reactive-flame-effect.md)
- [Circuit Playground Powerpuff Girls Valentine](https://learn.adafruit.com/circuit-playground-valentine.md)
- [CircuitPython Hardware: PCA9685 DC Motor & Stepper Driver](https://learn.adafruit.com/micropython-hardware-pca9685-dc-motor-and-stepper-driver.md)
- [Circuit Playground Quick Draw](https://learn.adafruit.com/circuit-playground-quick-draw.md)
- [FLORAbrella](https://learn.adafruit.com/florabrella.md)
- [CircuitPython Hardware: LED Backpacks & FeatherWings](https://learn.adafruit.com/micropython-hardware-led-backpacks-and-featherwings.md)
- [MakeCode Course for Circuit Playground Express](https://learn.adafruit.com/makecode-circuit-playground-express-course.md)
- [Make It Glow With Crickit](https://learn.adafruit.com/make-it-glow-with-crickit.md)
- [Circuit Playground Express Treasure Hunt](https://learn.adafruit.com/circuit-playground-treasure-hunt.md)
- [Make it Move with Crickit](https://learn.adafruit.com/make-it-move-with-crickit.md)
- [Automation with Crickit and Capsela](https://learn.adafruit.com/automation-with-crickit-and-capsela.md)
