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

Using conductive paint, a 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. 

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. 

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

A Black woman's manicured hand holds a round microcontroller with lit up LEDs.
Circuit Playground Express is the next step towards a perfect introduction to electronics and programming. We've taken the original Circuit Playground Classic and...
$24.95
In Stock
Bare Conductive Paint Pen
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.
Out of Stock
Two square-ish USB Powered Speakers
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...
$9.95
In Stock
Bundle of Small Alligator Clip Test Leads
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....
$3.95
In Stock
USB cable - USB A to Micro-B - 3 foot long
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...
$2.95
In Stock
Front angled shot of 3 x AAA battery holder with on-off switch and 2-pin JST PH connector.
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...
$1.95
In Stock
Angled shot of 3 PKcell AAA batteries.
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...
$1.50
In Stock

Materials

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

This map of NYC, courtesy of the New York Public Library, shows a large section of NYC is great detail, with helpful neighborhood indicators. 

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

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

As with all cutting instruments, take care and an older person should assist a younger person with sharp objects.

Cut around the outline of the map.

 

Use scissors or a hobby knife to do this.

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

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.

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!

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 - 417 Monroe St, Hoboken, NJ 07030
  6. John Lennon - Strawberry Fields - The Dakota 1 W 72nd St, New York, NY 10023 
  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 http://soundbible.com/ or https://freesound.org/

You will need to convert the files to the appropriate format for microcontroller use. See this guide on how to convert audio files

Your audio files must be named 01.wav02.wav, etc. so all filenames are two digits. 

No Mix & Match on mono and stereo files

Make sure your audio files are exported as 16-bit PCM WAV at 22,050 Hz and they are all Stereo or all Mono -no mix and match!

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, this guide will get you started.

If you haven't used Circuit Playground Express and CircuitPython together before, make sure you've updated it with the latest version of CircuitPython. This guide will show you how.

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.

Copy code.py from the link below and put it in CIRCUITPY root directory. You can work with this code in any text editing application, or open and save with Mu if you prefer. 

# SPDX-FileCopyrightText: 2018 Anne Barela for Adafruit Industries
#
# SPDX-License-Identifier: MIT

# Interactive Map
# for Adafruit Circuit Playground express
# with CircuitPython

from adafruit_circuitplayground.express import cpx

# Change this number to adjust touch sensitivity threshold, 0 is default
cpx.adjust_touch_threshold(600)

WHITE = (30, 30, 30)
RED = (90, 0, 0)
YELLOW = (45, 45, 0)
GREEN = (0, 90, 0)
AQUA = (0, 45, 45)
BLUE = (0, 0, 90)
PURPLE = (45, 0, 45)
BLACK = (0, 0, 0)

cpx.pixels.brightness = 0.1  # set brightness value

# The seven files assigned to the touchpads
audio_file = ["01.wav", "02.wav", "03.wav",
              "04.wav", "05.wav", "06.wav",
              "07.wav"]

# NeoPixel colors
step_col = [RED, YELLOW, GREEN, AQUA, BLUE, PURPLE, WHITE]

def play_it(index):
    cpx.pixels.fill(step_col[index])  # Light lights
    cpx.play_file(audio_file[index])  # play clip
    print("playing file " + audio_file[index])
    cpx.pixels.fill(BLACK)  # unlight lights

while True:
    # playback mode

    if cpx.touch_A1:
        play_it(0)
    if cpx.touch_A2:
        play_it(1)
    if cpx.touch_A3:
        play_it(2)
    if cpx.touch_A4:
        play_it(3)
    if cpx.touch_A5:
        play_it(4)
    if cpx.touch_A6:
        play_it(5)
    if cpx.touch_A7:
        play_it(6)

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

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 CIRCUITPY when you connect the CPX to your computer. If it is showing up as CPLAYBOOT on your computer, you can follow the steps in this guide to ensure CircuitPython is loaded and you see the CIRCUITPY drive.

 

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 pack is set to "ON". 

 

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!

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 for more details on playing audio through Circuit Playground Express.

This guide was first published on Dec 07, 2018. It was last updated on Dec 07, 2018.