Motion
Detects if any registered motion pattern has been recognized
Syntax: type = Motion()
Returns: This function returns a number, that has set bits at positions that corresponds to recognized registered motion patterns.
Notes: If for example more than one pattern is registered, then output from this function should be tested for each pattern separately. The typical way is to use predefined macros, which are testing if the bit on it's specified position is set or reset.
Example:
motion = Motion()
, variable motion holds information about recognized patternsif (motion) {...}
if there is any motion, we should handle itif (_is(motion, TAP_XPLUS)) {...}
if the motion is specificallyTAP_XPLUS
, we should handle it
See also: RegMotion, AckMotion, RegAllSideTaps, UnregAllMotion
Last updated
Was this helpful?