I would like to know if this is a sensor and the name of it if it is possible. I post two pictures, sorry about bad quality of them.
In my opinion it works sending different signal if something is between little "crystal sticks" into the dark of the black box.
Would be wonderful to know the schema to connect it to an Arduino, also if is mandatory to add some other component like resistor (I should post another question for this, may be)
Both components are very similar with a few little differences.
Thanks a lot in advance.