Reflective Sensor

AWOL:

But I can't figure out that code that makes it work.

Without more detail, nor can we.

Then what sort of details do you need?