
| Data | Numeric | Values | Notes |
|---|---|---|---|
| Proximity | Numeric | 0 to 100 | The relative distance to an object in front of the sensor. 0 means very close, and 100 means far away. |
| • | The Proximity value does not correspond directly to a specific distance. The value will depend on the color and material of the object in front of the sensor, and other factors. |
| • | The Infrared Sensor cannot detect Proximity to an object that is very close to the sensor (closer than about 1 cm or half an inch). |
| • | The Beacon mode of the Infrared Sensor also provides Proximity data, but only for detecting proximity to the IR Beacon. See Using the Infrared Sensor Beacon Mode for more information. |


| Block | Mode | Use |
|---|---|---|
| Wait | Infrared Sensor – Compare – Proximity | Wait for the Proximity to reach a specified value. |
| Wait | Infrared Sensor – Change - Proximity | Wait for the Proximity to change by a specified amount. |
| Loop | Infrared Sensor – Proximity | Repeat a sequence of blocks until the Proximity reaches a specified value. |
| Switch | Infrared Sensor – Beacon Proximity | Choose between two sequences of blocks depending on the Proximity. |
| Infrared Sensor | Measure - Proximity | Get the Proximity value on a Numeric data wire. |
| Infrared Sensor | Compare – Proximity | Compare the Proximity to a threshold, and get the result on a Logic data wire. |