int photocellPinl = 5;
int photocellPinr = 0;
int photocellright;
void setup(void) {
// We'll send debugging information via the Serial monitor
Serial.begin(9600);
}
void loop(void) {
photocellleft = analogRead(photocellPinl);
photocellright = analogRead(photocellPinr);
Serial.print("Left reading = ");
Serial.print(photocellleft); // the raw analog reading
Serial.print(" Right reading = ");
Serial.println(photocellright); // the raw analog reading
delay(100);
}
Why the right photoresistor keeps read 0 value while the left one is working properly? I try to swap the components and exchange the pin , either one photoresistor must read "0". If I unplug the "0" value analog pin, it reads something, but I plug the pin back it, it reads 0 again. So it occurred to me that the 2 photoresistors can not operate at the same time?
All one knows why?