Tone Piano

The following sketch uses the Circuit Playground speaker to play a different tone for each pad when touched.

Make sure you are using version 1.6.4 or newer of the Circuit Playground library.

Look in the takeAction() function and you will see a call to playTone() for each of the pads. The frequencies correspond to the basic musical notes. With this sketch loaded and running on the Circuit Playground, you should hear different tones played when a pad is touched.

We can use alligator clips and some paper to create a little piano. On a 6"x4" index card or other piece of paper, draw something similar to the picture below.

Now attach the alligator clips to the edge of the paper and the Circuit Playground as shown below.

Once you've clipped the alligators, press the reset button on the Circuit Playground so it will re-calibrate the capacitive touch sensors

To play a note, just touch the alligator clip on the edge of the paper. For example, in the picture below, E is being played.

Try out the following sequence of notes.

C-D-E-C-E-C-E     D-E-F-F-E-D-F 

Do you recognize the tune? Here's a hint.

This guide was first published on Nov 15, 2016. It was last updated on Nov 15, 2016.
This page (Tone Piano) was last updated on Jun 04, 2020.