Hii everyone,
I want to know the voltage of sensor I write the code its working fine on normal state of sensor but
I blocked the ir sensor the voltage is increase .5v , the board should not detect the blocked sensor voltage , So how to detected the voltage please suggest me.`
This is a code , I Used Atmega 2560
``
int value = 0;
float voltage;
void setup(){
Serial.begin(9600);
}
void loop(){
value = analogRead(A0);
voltage = value * 5.0/1023;
Serial.print("Voltage= ");
Serial.println(voltage);
delay(500);
}
Please post a link to the sensor product page or data sheet, and a wiring diagram (hand drawn is preferred, with pins and connections clearly labeled).
I have no idea about sensor just in sensor just given a voltage of 2.8v on normal state and in blocking state the sensor given 3.2v check with multimeter and the sensor has two- 1 pin is common grounding and other for taking output from sensor
that should not showing the difference they were two cases:
1.In first case i worked with normal cases that the normal case we should present the default case 1.86v repeated many times then 0 will coming in normal state
2.In second case they should worked on blocking the sensor in blocking state the sensor has no default values are given send in documentation .