Detecting, e.g. by using light barriers using one transmitter and one receiver using mechanical scanning systems