Start with our Wave Shield tutorial. This will guide you through assembling the shield, downloading and installing libraries and testing the board and SD card.

You’ll probably want to assemble it using stacking headers rather than the regular pin headers included with the shield. It’s up to you…read through the rest of this guide first and come up with a plan for your clock design, and how you might have things wired up.


For reference, the photo above shows a properly-assembled Wave Shield. The following are the most common errors encountered with the product:

  • The WaveHC library is not properly installed. This tutorial can offer some guidance.
  • The SD card is not properly formatted; even if your computer can read/write the card, it’s not necessarily “true” to the SD specification. Try formatting the card in a digital camera if you have one.
  • Jumper wires are missing (the five wires near the top edge of the board…pins 2-5 and 10).
  • One or more chips are turned the wrong way (notice the arrows pointing to the “bite”), or the DAC and amp chips are swapped.
  • Cold solder joints, or solder bridges…especially on the SD card slot connections. Solder should flow smoothly between pin and pad, like tiny Hersheys Kisses®. Reflow any badly-formed joints.

If your Wave Shield still refuses to work, make a new post in the Adafruit Forums. Please provide clear photos of both sides of the board, and completely describe the symptoms (including any error messages in the Serial Console).

Don’t continue until you have the “PiSpeakHC” demo working!

For timekeeping, you have Freedom of Choice: either the DS1307 breakout board or the Data Logging Shield (with optional stacking headers) can be used.

The Data Logging Shield costs a little more, but with the stacking headers installed it makes a tidy sandwich.

We won’t be using the SD card slot on the Data Logging Shield for this project. Don’t even put a card in there or there will be…trouble.

The less expensive DS1307 breakout board provides just the clock function.

This can be connected using a solderless breadboard and jumper wires. Or — with the 5-pin header installed — you can use the trick shown here and plug it into pins A2-A5 (the remaining pin isn’t used here and hangs off the end). This requires a special setup in the code, which we’ll get to shortly.

Resistors are soldered to each of the LEDs that’ll provide the face animation (one for eyes, one for the mouth). For red, yellow or green LEDs, use a 180-220 Ohm resistor. For all other colors, use 100-150 Ohm.

The resistor can go on the anode (+) or cathode (–) side of the LED; they’re not picky. Here I chose +.

I’m using 10mm red LEDs for the dry run; later I’ll substitute LED backlight modules instead.

Any sort of momentary pushbutton can be used to activate the clock. Tiny tactile buttons work great on a breadboard. Big arcade buttons are irresistable. Advanced users could modify the code and wiring to use a capacitive touch sensor or PIR (motion) sensor.

Here’s how things are wired up. The Wave Shield (and Data Logging Shield, if used) aren’t shown in the stack here, but would actually be installed atop the Arduino first.

  • The DS1307 (if used instead of the Data Logging Shield) connects to pins A2–A5 (the SQW pin on the board isn’t used and hangs off the edge).
  • Pushbutton connects between A0 and A1.
  • “Mouth” LED connects to pins D6 (+) and D7 ().
  • “Eyes” LED connects to pins D8 () and D9 (+).

Note the orientation on the two LEDs!

You’ll need a library for the realtime clock:

Install RTClib as any other Arduino library; unpack, move folder to Arduino sketchbook/Libraries folder, will be active on next restart.

Next, download the Arduino code and the example WAV files (Adabot’s voice) for the project:

After unpacking, copy the WAV files (not the WAVs folder, but the files inside) to the root folder of the SD card. Eject and return the card to the Wave Shield.

Move the TalkingClock folder to your Arduino sketchbook folder. Restart the Arduino IDE and you should be able to load the sketch and upload it to the board.

If all goes well, you should hear Adabot say “Hi there!” Tap the button to hear the current time. One LED (the “eyes”) should periodically blink, the other flashes when Adabot talks.

The workings of the code are explained on the last page of this guide. Some folks just want to make the clock, that’s cool.

If the RTC hasn't been used before, the TalkingClock sketch will automatically initialize the clock to the date & time the program was compiled.

If you ever need to change the time, here’s a minimal sketch that does the same thing, setting the clock to the compile time:

#include <Wire.h>
#include <RTClib.h>

void setup() {
  pinMode(A2, OUTPUT); digitalWrite(A2, LOW);       // Power RTC breakout
  pinMode(A3, OUTPUT); digitalWrite(A3, HIGH);      // On pins A2, A3
  Wire.begin();                                     // Init I2C
  RTC_DS1307::begin();                              // Init real-time clock
  RTC_DS1307::adjust(DateTime(__DATE__, __TIME__)); // Set to compile time

void loop() { }

After running this code on the board, upload the TalkingClock sketch again and it should be speaking the correct time!

This guide was first published on Aug 26, 2014. It was last updated on Mar 08, 2024.

This page (Dry Run) was last updated on Aug 22, 2014.

Text editor powered by tinymce.