Code:
#include <Audio.h>
// GUItool: begin automatically generated code
AudioInputI2SHex i2s_hex2; //xy=190,343
AudioOutputI2SHex i2s_hex1; //xy=431,344
AudioConnection patchCord1(i2s_hex2, 0, i2s_hex1, 0);
AudioConnection patchCord2(i2s_hex2, 1, i2s_hex1, 1);
AudioConnection patchCord3(i2s_hex2, 2, i2s_hex1, 2);
AudioConnection patchCord4(i2s_hex2, 3, i2s_hex1, 3);
AudioConnection patchCord5(i2s_hex2, 4, i2s_hex1, 4);
AudioConnection patchCord6(i2s_hex2, 5, i2s_hex1, 5);
AudioControlSGTL5000 sgtl5000_1; //xy=633,280
AudioControlSGTL5000 sgtl5000_2; //xy=633,368
AudioControlSGTL5000 sgtl5000_3; //xy=635,457
// GUItool: end automatically generated code
void setup() {
// create 4 test waveforms and distinct frequencies
analogWriteFrequency(28, 440);
analogWriteFrequency(33, 530);
analogWriteFrequency(36, 610);
analogWriteFrequency(37, 610);
analogWrite(28, 128);
analogWrite(33, 128);
analogWrite(36, 64);
analogWrite(37, 190);
AudioMemory(12);
// Enable the first audio shield, select input, and enable output
sgtl5000_1.setWire(Wire, LOW);
sgtl5000_1.enable();
sgtl5000_1.inputSelect(AUDIO_INPUT_LINEIN);
sgtl5000_1.volume(0.5);
// // Enable the second audio shield, select input, and enable output
sgtl5000_2.setWire(Wire1, LOW);
sgtl5000_2.enable();
sgtl5000_2.inputSelect(AUDIO_INPUT_LINEIN);
sgtl5000_2.volume(0.5);
}
void loop() {
}