2
\$\begingroup\$

What are Accelerometer single and double click event, can someone clarify it for me with some theory and/or practice?

\$\endgroup\$
3
\$\begingroup\$

Accelerometer single and double click events are easiest to understand if one considers them as a tap and double-tap equivalent of what we do with our computer mouse buttons.

The accelerometer MEMS devices that support the feature, incorporate the intelligence to determine when a tap is sensed, or two taps in rapid succession within a set period. The logic also distinguishes between such taps, and vibration due to, for instance, a car's movement. Click / double-click detection also filters out the sharp impact from a device being dropped, for instance, and will not generate a false positive "click" event if this occurs.

Once such a tap or double-tap event is detected, the accelerometer notifies the host microcontroller of this using either an interrupt line, or normal digital query-response. This saves the programmer from writing reams of code to identify, for instance,

  • "a pair of brief accelerations in opposing vectors in rapid succession" i.e. a click,
  • "two pairs of brief opposing accelerations, with more than x delay between the pairs, and less than y delay between the pairs" i.e. a double-click, and
  • "way too many brief accelerations in sequence, so it can't be someone tapping the device twice", i.e. a false alarm.

This click / double-click detection permits a hand-held device to be used like a single-button computer mouse, as an input interface, with the mouse button clicking being replaced by tapping on the device.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.