A0 is the potentiometer
A1 is connected to a couple of resistor (voltage divider from 12v to 5v)
A2 is connected to a lm35 termometer
in recent test i've noticed that when A1 is to 0 (potentiometer completely closed) the reading of the other two ports is perfect and stable. When i activate the potentiometer it goes all crazy
you might need introduce an extra read for every analog input to give it more time to stabilize. Behind the 6 pins there is only one ADC that switches between them.
Something is not right, those 3 devices you have connected to the analog inputs are all low-resistance sources, so there should be no interference. Can you post a photo of your setup?
One obvious problem is that you are overloading the Arduino digital output by connecting it direct to the base of the TIP121. You need to use a series resistor. 1K is a suitable value.
Your Fritzing diagram doesn't show a connection between the pot and +5V, but from the photo I can see that there is one.
MarkT:
Sketch? Are you doing anything with the potentiometer value that might have an impact on the supply voltage?
Ding ding ding, give that man a cigar. Look at the pot in the fritzling thingy. It's not wired right, it's pulling the voltage down when adjusted. It's set up to where it can completely short the power rails if it is adjusted all the way to one side.
dc42:
The wiring of the pot in the photo looks correct to me, assuming it is a normal pot with the wiper being the middle connection.
Ok I'm blind, I magnified it and now I can see that the orange wiper wire extends beyond the power bus and into A1. What about the red wire on the outer tab of the pot? It "appears" to be connected to an empty bus strip I think. Also I see a ground wire connecting the bottom negative bus to the top one, but I don't see a positive wire extending to the bottom bus.
If analogWrite interferes with analogRead, this normally means that you have a common ground wire serving your input and output devices, and a dodgy connection in that ground wire.
Now all the GNDs are converging at one pin next to the 5v, are you saying that i should wire them that the pmw Ground ends at the GND next to digital pins?