399
Multi-Channel Capacitive Touch
Unlike single capacitive touch buttons, multiple capacitive sensors have several potential uses. These
include multi-touch buttons, sliders, wheels, rotary encoders, etc. Here we will have a look at multiple
capacitive touch buttons and the example demonstrated here is basically the extension of the last
one. However, for multi-touch capacitive touch sensors, there are twists in the software end apart
from hardware design and considerations.
Code Example
structure.h (top part only)
#ifndef CTS_STRUCTURE_H_
#define CTS_STRUCTURE_H_
#include "msp430.h"
#include <stdint.h>
/* Public Globals */
extern const struct Element middle_element;
extern const struct Element up_element;
extern const struct Element down_element;
// Identify all sensors defined in structure.c
extern const struct Sensor multi_buttons;
//****** RAM ALLOCATION ********************************************************
// TOTAL_NUMBER_OF_ELEMENTS represents the total number of elements used, even if
// they are going to be segmented into seperate groups. This defines the
// RAM allocation for the baseline tracking. If only the TI_CAPT_Raw function