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

Enabling Gesture Sensor Output

To simplify the gesture tuning process, the CapTIvate Design Center can be used to display the gesture status and output using the User Data Oscilloscope Plot view. This is possible only when the demonstration software function sendGestureStatus_GUI() in the file media_player.c is enabled.

By default, this function is not enabled. To enable it, modify the following line of code in the file media_player.h.

#define SEND_GESTURE_DATA (true)

This function uses the CapTIvate library function CAPT_writeGeneralPurposeData() to send user-defined data to the GUI where it is displayed in the User Data Oscilloscope Plot view. The sensor's gesture data is transmitted to the GUI using the available UART on the MSP430FR2633 MCU board. By default, the UART is disabled. To enable the UART modify the following line of code in the file CAPT_UserConfig.h.

#define CAPT_INTERFACE (__CAPT_UART_INTERFACE__)

Each sensor callback by default will call the sendGestureStatus_GUI() when it is enabled. This creates a problem because all three sensors will send their data to the GUI and the information that is displayed gets confusing. To prevent the other two sensors from sending gesture data to the GUI, temporarily disable themby changing the #define in file gesture_definitions.h from true to false. The following code example shows how to enable just the slider sensor.

#define USE_BUTTONGROUP (false) #define USE_SLIDER (true) #define USE_WHEEL (false)

Because the demonstration software operates with wake on proximity mode enabled by default, the MCU is in a low-power mode when the CAPT-BSWP panel is not touched and no data is streamed to the CapTIvate Design Center. Touching any of the sensors wakes the MCU and data begins to stream. If this becomes inconvenient while tuning the sensor gestures, temporarily disable the wake on proximity feature and allow the data to stream continuously by modifying the following code example in file CAPT_UserConfig.h:.

#define CAPT_WAKEONPROX_ENABLE (false)

After all the required modifications, build and reprogram the MSP430FR2633 target MCU.