I have been trying to hook up a ldr to my deumilanove(s) (3 of them) (C9955),(C9953),(C9978) - now i hooked the ldr up to pin14(analog0) on 2 of the above boards and it doesnt work. on 1 of the boards, pin 15 doesnt work either. now to come to a very interesting observation, i wrote the code for the input to go with pin19 and by mistake it was hooked up to pin 14 yet there was a change in values as i moved a light source in and out of the ldr. i realised my mistake and hooked it up to pin 19 and the same difference showed u, now, me being me i hooked it up to pin14 again and there was the reading again(i was monitoring the seria port all the while!) is there a possibility that there is some data leakage or something along the pins? i would love an answer to this specific bug of pin14.
Heres the code i used...
int ldr = 16;
void setup()
{
pinMode(ldr,INPUT);
Serial.begin(9600);
}
void loop()
{
Serial.println(analogRead(ldr));
}