SLAA877 December   2018 MSP430FR2633

 

  1.   Capacitive Touch Gesture Software and Tuning
    1.     Trademarks
    2. 1 Introduction
    3. 2 Gestures
      1. 2.1 Theory of Operation
      2. 2.2 Sensor Gesture Processing
      3. 2.3 Gesture Software Overview
        1. 2.3.1 Slider Gesture
        2. 2.3.2 Wheel Gesture
        3. 2.3.3 Button Gesture
        4. 2.3.4 Sensor Handlers
        5. 2.3.5 How to Add Gestures to the CapTIvate Framework
    4. 3 Tuning
      1. 3.1 CapTIvate Design Center
        1. 3.1.1 Enabling Gesture Sensor Output
        2. 3.1.2 CDC Plot Channel Assignments
      2. 3.2 Tuning Process
        1. 3.2.1 Tap
        2. 3.2.2 Double Tap
        3. 3.2.3 Swipe
        4. 3.2.4 Slide
    5. 4 Example Demonstration Software Installation
      1. 4.1 Project Directories
      2. 4.2 Import the Project Into CCS

Sensor Gesture Processing

There are two types of gesture attributes that define a gesture. The first attribute type is time. Time is expressed in sample counts and is measured by counting the number of sensor measurement samples between two events, such as a finger touch followed by release. For example, when a sensor is sampled every 20 milliseconds, a touch that lasts 10 sample periods represents a touch for 200 milliseconds. The time attribute applies to buttons, sliders, and wheels. A gesture can use one or more timing attributes to define parameters such as "sample count min" or "sample count max". A sample count min parameter = 5 means there is a minimum of 5 sample counts required.

The second attribute type refers to distance. Distance is expressed in points of resolution and measured between two reported finger positions on the slider and wheel sensor. In addition to the time attribute, a slider or wheel gesture can use one or more distance attributes to define parameters such as "swipe distance min" or "slide step size min". A swipe distance min parameter = 50 means the finger must move a minimum distance of 50 points. The number of resolution points chosen for a distance parameter depends on the resolution of the slider or wheel sensor. In the example software, the slider has a 1000-pt resolution and the wheel has a 100-pt resolution. So if a slider is configured with 1000-pts of resolution, a finger that moves 10% of the slider length moves 100-pts.

Why is it important to use parameters to set rules for gestures? Because a finger gesture duration and speed can vary from user to user and using parameters help improve gesture behavior repeatability and detection accuracy. The slider, wheel and button sensor types have their own gesture parameters and are configurable in software. Because each sensor type can support different gesture behaviors, processing is specific to a sensor. This is why each sensor has its own gesture state machine and gesture parameters. The sensor gesture software function is essentially a state machine that is executed after each sensor measurement as part of the sensor's callback function.