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


1 Answer 1


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.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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