I need Serial and Midi and audio via USB. When selecting Serial + Midi + Audio in Tools/UsbType in the Arduino IDE this code sends no Audio to the PC via USB.
When selecting only Audio in Tools/UsbType in the Arduino IDE the audio is sent to the PC just fine. However now we have no serial port or MIDI. We need both Audio, serial port and MIDI via USB.
Board: Teensy 3.6. Audio shield with microphone soldered in. ILI9341 display connected on alternative pins since there is an Audio shield mounted.
Compiled with Teensy lib version 1.58.1 (also tested some earlier versions, but same problem)
I have raised this issue https://github.com/PaulStoffregen/cores/issues/705
When selecting only Audio in Tools/UsbType in the Arduino IDE the audio is sent to the PC just fine. However now we have no serial port or MIDI. We need both Audio, serial port and MIDI via USB.
Board: Teensy 3.6. Audio shield with microphone soldered in. ILI9341 display connected on alternative pins since there is an Audio shield mounted.
Compiled with Teensy lib version 1.58.1 (also tested some earlier versions, but same problem)
I have raised this issue https://github.com/PaulStoffregen/cores/issues/705
Code:
// Audio is sent to the PC only when Audio is selected under Tools/UsbType in Arduino IDE.
// Does not send audio when Serial + Midi + Audio is selected under Tools/UsbType in Arduino IDE.
// We need Audio and Midi and serial via USB. This has worked before, however some years since I tested.
// The below code DOES send audio thru from the mic on the Audio shield when only Audio is selected under
// Tools/UsbType in the Arduino IDE so the hardware works.
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <SerialFlash.h>
// GUItool: begin automatically generated code
AudioInputI2S i2s1; //xy=165,171
AudioOutputUSB usb1; //xy=502,170
AudioConnection patchCord1(i2s1, 0, usb1, 0);
AudioConnection patchCord2(i2s1, 1, usb1, 1);
AudioControlSGTL5000 sgtl5000_1; //xy=314,496
// GUItool: end automatically generated code
void setup(void)
{
Serial.begin(9600);
Serial.print("running");
AudioMemory(5);
sgtl5000_1.enable();
sgtl5000_1.inputSelect(AUDIO_INPUT_MIC);
//sgtl5000_1.volume(0.5);
//sgtl5000_1.micGain(10);
//sgtl5000_1.audioPreProcessorEnable();
}
void loop(void)
{
Serial.print("Inside the loop");
}