Skip to content

Stand‐Alone: Predefined Boards

Phil Schatzmann edited this page Feb 6, 2024 · 8 revisions

You can use this library stand alone w/o the audio tools to initialize the codec chip by using the predefined boards.

E.g. the following code is setting up and starting the codec on a Lyrat board:

#include "AudioBoard.h"

void setup() {
  CodecConfig cfg;
  cfg.adc_input = ADC_INPUT_LINE1;
  cfg.dac_output = DAC_OUTPUT_ALL;
  cfg.i2s.bits = BIT_LENGTH_16BITS;
  cfg.i2s.rate = RATE_44K;
  //cfg.i2s.fmt = I2S_NORMAL;
  //cfg.i2s.mode = MODE_SLAVE; 
  LyratV43.begin(cfg);   

}

After you have been setting up the codec you can set up I2S and output the audio. E.g.

Clone this wiki locally