Skip to content

Commit 4cbff2c

Browse files
committed
mic.ino
1 parent 8cd3e85 commit 4cbff2c

File tree

1 file changed

+12
-2
lines changed
  • examples/examples-custom-boards/lyrat-mini/mic

1 file changed

+12
-2
lines changed

examples/examples-custom-boards/lyrat-mini/mic/mic.ino

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,27 @@
11

2+
/**
3+
* The microphone seems to be attached to 2 different i2s ports. In addition to the
4+
* ES8311, the ES7243 is also started.
5+
* The I2S pins can be selected via cfg.i2s_function: CODEC uses the ES8311 I2S pins
6+
* and CODEC_ADC uses the ES7243 I2S pins; By default the CODEC value is used.
7+
*
8+
* Unfortunatly neither setting will give a proper microphone input!
9+
*/
210

311
#include "AudioTools.h"
412
#include "AudioTools/AudioLibs/AudioBoardStream.h"
513

6-
AudioInfo info(44100, 1, 16);
14+
AudioInfo info(44100, 2, 16);
715
AudioBoardStream i2s(LyratMini); // Access I2S as stream
816
CsvOutput<int16_t> csvStream(Serial);
917
StreamCopy copier(csvStream, i2s); // copy i2s to csvStream
1018

1119
// Arduino Setup
1220
void setup(void) {
1321
Serial.begin(115200);
14-
AudioToolsLogger.begin(Serial, AudioToolsLogLevel::Warning);
22+
// Display details what is going on
23+
AudioToolsLogger.begin(Serial, AudioToolsLogLevel::Info);
24+
AudioDriverLogger.begin(Serial, AudioDriverLogLevel::Info);
1525

1626
auto cfg = i2s.defaultConfig(RX_MODE);
1727
cfg.copyFrom(info);

0 commit comments

Comments
 (0)