Hello Arduino community,
I am building a line following robot, and right now have been doing experimentation with some reflectance sensors. I used the setup and code exactly from their bildr tutorial, and got it working, printing out values that were good. Now I came back to it, after a few days, out it back together, and nothing works.
int reflectancePin = 0; //connected to analog 0
void setup(){
Serial.begin(9600);
}
void loop(){
int reflectanceVal = analogRead(reflectancePin);
delay(1500);
Serial.println(reflectanceVal);
}
For some reason, whenever I run this, in the Serial monitor, no matter what I put in front of the reflectance sensor, it only prints out 14.
Please help, I really have no idea what could be causing this.
Thanks,
ma7730