I'm starting to consider the possibility of a bug within the arduino hardware or IDE (compiler).
I ran tests similar to suggested ones on this thread, and it turns out I can turn on all 12 lights without affecting the ADC if I don't use if statements using the following code:
void loop()
{
int sensorValue = analogRead(A1);
digitalWrite(2, HIGH); digitalWrite(3, HIGH); digitalWrite(4, HIGH);
digitalWrite(5, HIGH); digitalWrite(6, HIGH); digitalWrite(7, HIGH);
digitalWrite(8, HIGH); digitalWrite(9, HIGH); digitalWrite(10, HIGH);
digitalWrite(11, HIGH); digitalWrite(12, HIGH); digitalWrite(13, HIGH);
delay(1);
}
When I'm sampling the audio signal but ignoring it, I can do whatever I want with the lights and the ADC does not exhibit the odd going-high behavior described in the original post. Can it have something to do with the if statements?
Thank you all for your interest and suggestions.