![]() |
The Infrared Sensor block gets data from the Infrared Sensor. You can measure sensor data in the Proximity, Beacon, and Remote modes and get Numeric output. You can also compare sensor data to an input value and get a Logic (True or False) output. See Using the Infrared Sensor for more information about the data provided by the Infrared Sensor, and programming examples. |





| Input | Type | Allowed Values | Notes |
|---|---|---|---|
| Channel | Numeric | 1 - 4 | The channel on the IR Beacon to detect. |
| Compare Type | Numeric | 0 - 5 | 0: = (Equal to) 1: ≠ (Not Equal to) 2: > (Greater than) 3: ≥ (Greater than or Equal to) 4: < (Less than) 5: ≤ (Less than or Equal to) |
| Threshold Value | Numeric | Any number | Value to compare sensor data to |
| Set of Remote Button IDs | Numeric Array | Each element: 0 - 11 | Button ID(s) to test. See Using the Infrared Sensor Remote Mode. |
| Output | Type | Values | Notes |
|---|---|---|---|
| Proximity | Numeric | 0 to 100 | The beacon or object proximity. 0 means very close, and 100 means far away. The Proximity will be 100 if the beacon or object is not detected at all. |
| Detected | Logic | True/False | True if the beacon is detected. |
| Heading | Numeric | -25 to 25 | The beacon heading. 0 means the beacon is directly in front of the sensor, negative values are to the left, and positive values are to the right. |
| Button ID | Numeric | 0 - 11 | Identifies which button, or combination of buttons, is pressed on the IR Beacon. See Using the Infrared Sensor Remote Mode. |
| Compare Result | Logic | True/False | True/False result of a Compare mode. |