JohannGambolputtyEtc
New member
Hi Paul/Forum,
I've noticed some strange behavior of analogread. Changing the voltage at one pin influences the readout of the next pin being read.
The circuit consists of 4 potentiometers (104k) wired to analog pins 0 to 3. The graphs are made with Processing using a modified version of the sketch included in the teensyduino graph example.
First the teensy reads all 4 pins and you can see the effect of each potmeter on the next pin being read (the large value changes are of course me rotating the pots), with pin 3 affecting pin 0. But if I simply change the sketch to only read pins 0 and 2, using the same circuit, the same effect occurs. This time ignoring the pins not being read (with 0 affecting 2 and vice versa). This behavior occurs all the way to pin 9.
I doubt this behavior is normal and being a total newb I have probably tortured my T3.0 many times by making some wrong connections and also doing the teensyduino tutorials at 5V instead of 3.3V. Any clarification on this issue? Did I cripple my poor T3.0? Thanks in advance!
I've noticed some strange behavior of analogread. Changing the voltage at one pin influences the readout of the next pin being read.
The circuit consists of 4 potentiometers (104k) wired to analog pins 0 to 3. The graphs are made with Processing using a modified version of the sketch included in the teensyduino graph example.
First the teensy reads all 4 pins and you can see the effect of each potmeter on the next pin being read (the large value changes are of course me rotating the pots), with pin 3 affecting pin 0. But if I simply change the sketch to only read pins 0 and 2, using the same circuit, the same effect occurs. This time ignoring the pins not being read (with 0 affecting 2 and vice versa). This behavior occurs all the way to pin 9.
I doubt this behavior is normal and being a total newb I have probably tortured my T3.0 many times by making some wrong connections and also doing the teensyduino tutorials at 5V instead of 3.3V. Any clarification on this issue? Did I cripple my poor T3.0? Thanks in advance!
Code:
void setup()
{
Serial.begin(9600);
}
void loop()
{
Serial.print(analogRead(0));
Serial.print(",");
Serial.print(analogRead(1));
Serial.print(",");
Serial.print(analogRead(2));
Serial.print(",");
Serial.println(analogRead(3));
delay(50);
}
Code:
void setup()
{
Serial.begin(9600);
}
void loop()
{
Serial.print(analogRead(0));
Serial.print(",");
Serial.println(analogRead(2));
delay(50);
}
Last edited: