Can you write a simple program to prove that not on,y does the sensor light up but you can get an indication of that in you program from reading the input?
Your logic is a bit confusing to me, so I would just try the simplest report you can make about what the sens or is saying.
Or try an example sketch you might find for it.
a7