How do I recognise the difference in transent data?

I am currently working with 2 sensors. A pressure sensor and a capacitive sensor. I would like to know how I can differentiate between a long press and a short press using Arduino code. Any help will do?

millis() is a free running counter that you can use to capture and compare times in milliseconds.

Save the value of miiis() millis() when the sensor becomes pressed. Save it again when the sensor becomes released. Subtract the start time from the end time and you have the duration of the press. Test the duration and determine whether long or short and act accordingly.

The code in this link illustrates how to detect different button clicks.

...R

UKHeliBob:
Save the value of miiis() [...]

What is miiis()?

GolamMostafa:
What is miiis()?

It is a smelling mistake

UKHeliBob:
It is a smelling mistake

Hard to know what is in the mind.