Hello Guys,
i hope this finds you well.
So i’m trying to measure the distance using the IR LEDS as you see in the circuit diagram (ATTACHED).
However, im not getting any voltage reading at all. All im getting is 0.00s, when i’m supposed to get any value in between 0.00V to 5.00V depending on the distance of my hands to the LEDs.
I tried to remove the resistor and i’m still getting no results at all.
I checked on the volts across each LED and it reads 5V.
what am i doing wrong?
//*************** CODE USED **************
void setup() {
Serial.begin(9600);
}
void loop() {
float sensorValue = analogRead(A0)*(5.0/1023.0);
Serial.println(sensorValue);
delay(100);
}