I am using an IR sensor (model BR3M) connecting to digital port.
Has external power and he seems to respond well (because lights on when passes the object), but the value of the print on the console (Serial.println (sensorleitura) takes a long time to update.
Only after 3 or 4 seconds is changing the value (from 0 to 1 or the opposite)
I tested with a Sharp sensor( analog) and works well
What could it be?
The arduino are to slow?
int sensor = 7;
** pinMode(sensor, INPUT);**
** sensorleitura = digitalRead(sensor);**