LED obstacle sensor

Hi guys!

This sensor is based on arduino - LED sensor example with an IR LED used as ir emitter.
I do 2 readings:
one with ir emitter on - one with ir emitter off
If the result of this operation is positive, we have something in front of the sensor. With this algorithm I can determine also the ambient light.
Look at the code.

The google translate traduction is not precise.