I'm using the Teensy 4 Rev D audio card with a Teensy4.1. The audio works well, however when I define the audio output object as AudioOutputI2S, this disables analogRead(22). As far as I can see from the RevD schematic and the pin descriptions, Pin 22 should not be touched by the AudioOutputI2S code on Teensy4.1. (It is with Teensy 3.) If I comment out the AudioOutputI2S, the analogRead again works. Is this a mistake of mine, or is there a library fault? Is there a workaround? I'm using all the other pins so cannot easily change pin. This simple code below demonstrates the problem.
#include <Audio.h>
AudioOutputI2S AudioOutPort; // Comment this line out and analogRead(22) starts working.
void setup()
{
}
void loop()
{
Serial.println(analogRead(22));
delay(1000);
}
#include <Audio.h>
AudioOutputI2S AudioOutPort; // Comment this line out and analogRead(22) starts working.
void setup()
{
}
void loop()
{
Serial.println(analogRead(22));
delay(1000);
}