Easy Tap Type Detection
Easier to use set of functions for tap type Detection
Syntax: eTapSideOK()
Notes: Checks if any valid SIDE TAP is detected. It is usually called before eTapSide()
to confirm correct results. If, for example TAP_GENERIC would be registered as well, eTapSide()
might give the wrong output, because if the function cannot confirm a valid tap, it returns 0.
Syntax: eTapSide()
Notes: Gives back number of the side that has been tapped. If the motion patterns do not include any specific taps, it returns 0 as well. That is why it is good to use eTapSideOK()
. If only sides taps are registered, then there is no problem.
Syntax: eTapToSide()
Notes: Returns 1 if the last tap was to a side. It takes top side from acc data, past=4
Syntax: eTapToTop()
Notes: Returns 1 if the last tap was to the top. It takes top side from acc data, past=4
Syntax: eTapToBot()
Notes: Returns 1 if the last tap was to the bottom. It takes top side from acc data, past=4
Example:
if (eTapSideOK()) {
side=eTapSide();
// work with side
}
if (eTapToTop) {...}
See also: ReadAcc
Last updated
Was this helpful?