How to detect how fast a value is changing with if conditions

Hi - I would like to know how I can “measure” how fast someone is coming near the ultrasonic sensor and use this as an event: For Example someone is coming slowly - the distance value decreases between 1 and 4 units per second. This should activate an object (for example a sphere). If the person is jumping to the sensor (the value decreases by 20 or more units in one second) the object will be turn off. Do you have any idea what components do I need?

I already have my Serial input via ardunio but im new to touch designer and all these components :sweat_smile:

See examples for Slope CHOP in Operator Snippets