Menu

Loop a wave file

Majenko Technologies

Looping a file can be even simpler than playing them manually. This small snippet will start playing a wave file in a continuous loop forever.

:::C++
// The WavePro uses SPI, so you need to include the
// SPI library first.
#include <SPI.h>
#include <WavePro.h>

void setup()
{
    // Start up and configure the board
    WavePro.begin();

    // Start playing the looped file
    WavePro.play_loop("LOOP.WAV");
}

void loop()
{
}

Part of: [Examples]


Related

Wiki: Examples

MongoDB Logo MongoDB