CSE_Touch is an Arduino library from CIRCUITSTATE Electronics. It is a unified touch interface library for the Arduino platform. The advantage of using a unified library is that you can change the touch panel in your application code very easily with only minor changes to the code. CSE_Touch is designed to be extensible and compatible with our CSE_UI library.Currently, the library supports the following touch controllers.
- FT6206
- CST328
This library is available from the official Arduino Library Manager. Open the Arduino IDE, search for "CSE_Touch" and install the latest version of the library.
Additionally, you can download the latest release package from the GitHub repository and install it manually. To do so, open the Arduino IDE, go to Sketch > Include Library > Add .ZIP Library…
and select the downloaded file.
Another method is to clone the GitHub repository directly into your libraries
folder. The development branch will have the latest features, bug fixes and other changes. To do so, navigate to your libraries
folder (usually located at Documents/Arduino/libraries
on Windows and ~/Documents/Arduino/libraries
on macOS) and execute the following command:
git clone https://github.com/CIRCUITSTATE/CSE_Touch.git
Git should be installed on your computer.
The library can also be installed via PlatformIO. All officially listed Arduino listed libraries are automatically fetched by PlatformIO. Use the lib_deps
search option to install the library.
Based on the touch controller you want to use, the driver is automatically selected by the CSE_Touch library. Currently, the following libraries from CIRCUTISTATE are supported. Make sure to install them depending on which one you are going to use.
- CSE_CST328 - For CST328 capacitive touch controllers.
- CSE_FT6206 - For FT6206 capacitive touch controllers.
There are no examples that are directly supported by the Arduino IDE. This is because of the Arduino's complex and convoluted dependency resolution and compilation design. However, you can find examples in the examples folder that are compatible with the PlatformIO IDE. These examples were written for and tested with FireBeetle-ESP32E development board from DFRobot and the 2.8" Capacitive Touch LCD from Waveshare. But you can adapt the examples for any Arduino-compatible boards or other supported touch panels.
- Read-Touch-Interrupt - Demonstrates the use of the interrupt method instead of the polling method.
- Read-Touch-Polling - Demonstrates the use of the polling method instead of the interrupt method.
Please see the API.md file for the API reference.
- CSE_UI - CIRCUITSTATE GitHub - An Arduino GUI library for common TFT/IPS screens.
- CSE_CST328 Library - An Arduino library for CST328 capacitive touch controllers.
- CSE_FT6206 Library - An Arduino library for FT6206 capacitive touch controllers.
- Waveshare 2.8" Capacitive Touch LCD
- DFRobot FireBeetle-ESP32E