Stiff Poti Values

I have the simple Potentiometer Setup as in the Arduino basic tutorial.

But the values i get dont vary with moving the potentiometer.
they are noisy wit uploading the sketch and then stabilise sometimes around 170 sometimes around 120

Using a Photosensor i had the same Problem
the values stayed stiff around 170
the less light there was the more noisy it got until ranges between 230 and 100
anyone an idea where this values come from?

there could also be a problem in the code but i guess its any mechanical issue

what do you say?

Did you connect the grounds?

maybe you can guess soething on the fotos?

are there multiple grounds?

i went from my VCC to the poti to the ground
and the backside wire to PIN A2

Already did something wrong?

Can we have them so they are actually focused? And the code would help as well. Looks like you are not using the right pin.

And it may be worth checking the voltage on the analog pin in question directly with a multimeter -
measure this at the Arduino pin itself, don't assume all your wires work unless you've tested
those too.

The pins of the Nano are not soldered to the board.
It will never work reliably like that.
Leo..

thanks for the responses.

dont have a multimeter around meat the moment

te supposed potantial should be +5

actually i dont expect it to act reliable yet i just want to see the tendency to see like
''alright this is how the poti curcuity goes..''

code is this

void setup() {

Serial.begin(9600);
int ledPin = 2;
pinMode(ledPin,OUTPUT);
}

void loop() {

int ledPin = 2;

digitalWrite(ledPin, LOW);
int poti = analogRead (A2);
Serial.println(poti);
delay(5);
}

i know ledPin declared twie makes no sense but dont know seemed safer to me like that.
cause it was declared in the void phrase in the example but the ide wanted it to be declaredint loop phrase.

nevermind

if the circuit was just instable beacuse its not fix wired
how could i get then such a stable value?

when i take wires of i get noise..

i'lldo some webcam acrobatics and tr to get some better pictures.

loading up in 5 minutes

a yeah sorry i missunderstood of course soldering the bins fix on the arduino
of course… gonna do that.

what about the picture?

is that more useful?

Yes you need to solder those pins. Waste of time doing anything else until you have done this.

this was really the thing

works perfectly with soldered pins.

thanks guys