Hi, I'm making a project using Teensy 4.0 and audioboard. I want to get an input signal from an electric guitar and output the sound to an amp.
I wired the cables like this:
The black cable is the input and the white cable is the output.
And here is my code:
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <SerialFlash.h>
// GUItool: begin automatically generated code
AudioInputI2S i2s1; //xy=320,325
AudioOutputI2S i2s2; //xy=535,324
AudioConnection patchCord1(i2s1, 0, i2s2, 0);
AudioConnection patchCord2(i2s1, 1, i2s2, 1);
AudioControlSGTL5000 sgtl5000_1; //xy=323,403
// GUItool: end automatically generated code
void setup() {
// put your setup code here, to run once:
delay(250);
AudioMemory(10);
delay(250);
sgtl5000_1.enable();
sgtl5000_1.inputSelect(AUDIO_INPUT_LINEIN);
sgtl5000_1.volume(1);
}
void loop() {
// put your main code here, to run repeatedly:
delay(200);
}
I will add other features later including an OLED screen and a rotary encoder but for now, I just want to pass the audio through the teensy. But for some reason, my guitar amp doesn't make any sound. Any solutions?