The problem - after connecting Sharp’s sensor to Arduino Uno AD converter returns maximum level of measured signal for distance < circa 0,5m. Everything’s done just like in examples. I’ve connected red cable to 5V ARduino’s output, black one to GND and sensor’s output directly to analog input A5. I’ve checked the sensor with multimeter- works properly.
Here “my” code:
int irReader = A5; // the analog input pin for the ir reader
float irVal = 0; // stores value from Ir reader
irVal = analogRead(irReader); //[V]
Is anything else required? Or maybe I should connect Vout through pull-down resistor?