Test

#include "AudioGeneratorTone.h"

#include "AudioOutputI2S.h"


AudioGeneratorTone *tone;

AudioOutputI2S *out;


void setup() {

  Serial.begin(115200);


  out = new AudioOutputI2S();

  out->SetPinout(26, 27, 25);   // BCLK, LRC, DOUT

  out->SetGain(1.0);


  tone = new AudioGeneratorTone();

  tone->begin(out, 1000); // 1000 Hz tone

}


void loop() {

  if (tone->isRunning()) {

    tone->loop();

  }

}

Post a Comment

Previous Post Next Post

Contact Form