Grove - Infrared Reflective Sensor v1.2 can be used for detection of proximity and colour of objects. The reflective photosensor - RPR-220 used in this module consists of an infrared light emitting diode and a high sensitivity phototransistor. Light-coloured objects directly in front of the sensor will reflect more infrared light as well as generate more current in the phototransistor than an object with dark-coloured surfaces, this can be tell from a built-in indicator LED which will turn red with sufficient flow of current. Also, the intensity of the reflective light increases as the object getting closer. You can adjust the potential-meter on the back of the board if you want to detect a specific object (eg. Black line) at a certain distance.
This sensor is a widely used in applications such as line-following robots, rotary speed detection, auto-data logging on utility meters or other situations where colour or distance contrast is sharp.