Sensor for detecting people passing by