so say i have pot A, and pot B, When pot A increases in value pot B does so too, but not vice versa, and when in the code i ONLY read pot B it's FINE!
and pot A doesn't affect any other pots, just pot B,
on Arduino micro, Atmega32u4
i've tried double reading it but doesn't work
using delay(75); fixes the issue but has alot of noise, more delay is just unusable.
tried adding 0.1 uf and 0.01 uf capacitors to the input and gnd of pot B and doesn't work
every pot is 10k yet only these 2 are messed up
although they're different since they're the pots from the xbox 360 controller triggers.
edit: forgot to add that the reason i can't use code 2 is my main code measures a lot of things so having a delay is just no.
using millis() libraries also didn't work.
void loop()
{
analogRead(A6);
delay(1);
int a6 = analogRead(A6);
analogRead(A8);
delay(1);
int a8 = analogRead(A8);
}
I vaguely recall that there was an issue with the analogRead not waiting long enough for the input to settle out after the multiplexer switched to a different channel so double reading with a delay on all channels should fix it.
But I took a look at some code I have that reads multiple ADC channels and I'm not having the problem, so perhaps my memory is foggy.
didn't work, code 2 is still the only one that works, 75 milliseconds still being the lowest delay
edit: forgot to add that the reason i can't use code 2 is my main code measures a lot of things so having a delay is just no.
using millis() libraries also didn't work.
This is an excellent example of the reason for my feelings towards Fritzy.
1: try disconnecting EVERYTHING else.
2: draw a schematic of how JUST the two pots are connected to the arduino.
3: Run this code, that does a dummy read after EACH change of input