hello guys,
i hope finds well.
so i'm trying measure distance using ir leds see in circuit diagram (attached).
however, im not getting voltage reading @ all. im getting 0.00s, when i'm supposed value in between 0.00v 5.00v depending on distance of hands leds.
i tried remove resistor , i'm still getting no results @ all.
i checked on volts across each led , reads 5v.
what doing wrong?
//*************** code used **************
void setup() {
serial.begin(9600);
}
void loop() {
float sensorvalue = analogread(a0)*(5.0/1023.0);
serial.println(sensorvalue);
delay(100);
}
thank
i hope finds well.
so i'm trying measure distance using ir leds see in circuit diagram (attached).
however, im not getting voltage reading @ all. im getting 0.00s, when i'm supposed value in between 0.00v 5.00v depending on distance of hands leds.
i tried remove resistor , i'm still getting no results @ all.
i checked on volts across each led , reads 5v.
what doing wrong?
//*************** code used **************
void setup() {
serial.begin(9600);
}
void loop() {
float sensorvalue = analogread(a0)*(5.0/1023.0);
serial.println(sensorvalue);
delay(100);
}
thank
you have thing backwards , resistors little high on ir led use 470 ohm on ir led.
and blue wire on wrong side of resistor
and blue wire on wrong side of resistor
Arduino Forum > Using Arduino > Project Guidance > Problem - Measuring Distance by IR Emitter LED & IR Receiver LED
arduino
Comments
Post a Comment