The ZX Sensor uses infrared light to determine the distance from an object and where the object is located on the X axis (between IR LEDs), available from SparkFun Electronics
The ZX Distance and Gesture Sensor is sensor capable of sensing an object's distance from the sensor and its location between the IR LEDs.
Maintainer: SparkFun Electronics
This library is compatible with all architectures so you should be able to use it on all the Arduino boards.
To use this library, open the Library Manager in the Arduino IDE and install it from there.