Need help with Adafruit VCNL4000 Proximity/Light Sensor

Hello thanks in advance to all of you for any help you could possibly provide me with.

I'm working on a project in which I need to determine the displacement between two aluminum plates as they move away from each other. For that I purchased a VCNL4000 Proximity/Light Sensor from Adafruit. The link to that is given as follows-

The code for the sensor was given on the website and is attached with this post. It gives out AMBIENT and PROXIMITY values but not displacement as could be seen in the image attached to the post.

I would really appreciate if someone could help me find a way to find the displacement using this sensor.

Thank You

displacement_sensor.ino (4.2 KB)

to find the displacement using this sensor.

What do you mean by "displacement" ?
All the specs are on the datasheet . Did you read the datasheet ?

Thanks for your reply!

By "displacement" I mean the change in distance between the two plates as one moves away from the other.

In essence, I need to convert the proximity values it spits out into distance values.

I looked up the datasheet and it gives a plot between proximity and distance. I'm trying to curve fit the values from that plot somehow and get a relation between "proximity" and "distance".

But I was wondering if there's a better way to to that from VCNL4000 sensor.

The datasheet link is this-

Thank You

The range is 200mm (20 cm/7.87 inches)