Tsunami Super WAV Trigger Hookup Guide

Pages
Contributors: santaimpersonator
Favorited Favorite 2

Arduino Libraries and Example

Note: This example assumes you are using the latest version of the Arduino IDE on your desktop. If this is your first time using Arduino, please review our tutorial on installing the Arduino IDE. If you have not previously installed an Arduino library, please check out our installation guide.

Arduino Libraries

The Qwiic Tsunami is a unique product, in that two different Arduino libraries are available to control the board. For more information on how to install an Arduino library in the Arduino IDE, check out our tutorial below.

Installing an Arduino Library

January 11, 2013

How do I install a custom Arduino library? It's easy! This tutorial will go over how to install an Arduino library using the Arduino Library Manager. For libraries not linked with the Arduino IDE, we will also go over manually installing an Arduino library.

Serial Control

As with the original Tsunami, the Qwiic Tsunami can also be controlled from the serial connection with the Tsunami Arduino serial library. For more details on how to utilize this library, please refer to the Tsunami user guide under "Serial Control" and tutorial, which are available on the Robertsonics website.

I2C (Qwiic) Control

Unlike the original Tsunami, the Qwiic Tsunami now has a Qwiic connector; and therefore, the board can be controlled with I2C, through the Qwiic connect system, using the SparkFun Tsunami Qwiic Arduino library.

SparkFun Tsunami Qwiic Arduino Library in library manager

The SparkFun Tsunami Qwiic Arduino Library in the Arduino library manager. Click to enlarge)

Users can install this library through the Arduino Library Manager. Search for SparkFun Tsunami Qwiic Arduino Library and you should be able to install the latest version. Users who prefer manually downloading the libraries from the GitHub repository, can download it here:

The utilization of this library mimics the serial control version to allow users to easily transition between the two. For more details on how to use this library, users can check out the documentation from the serial control library and the Tsunami user guide under "Serial Control".

Tsunami Qwiic Arduino Library Example

Note: If users experience problems with the audio output to their headphones, there are different headphone connector standards that might be the issue. If that is the case, users only need to swap the connection from SLEEVE pin on TRRS 3.5mm breakout board to the RING2 pin.

different headphone jack standards
Two of the more common variations of the headphone jack connection standards. (Click to enlarge)
Source: quora.com

Once you've got the Qwiic version of the library installed, open the Example 01 PlayFile sketch. You can find it under

File > Examples > SparkFun Tsunami Super WAV Trigger Qwiic > Examples

Then load it onto your RedBoard Plus or Uno. Open your favorite Serial Terminal to see the debug output and trigger the board to reset.

  • Users should hear the "track 1" *.wav file play on one side of the headphones.
  • Users should also see the status LED illuminate green while a file is playing.

debug output from example
Running the Arduino library example. (Click to enlarge)

Feel free to try other examples as well to get a better understanding of the library operation.