Grove - Capacitive Touch Slide Sensor(CY8C4014LQI)
The Grove - Capacitive Touch Slide Sensor(CY8C4014LQI) is a multifunctional touch sensor. You can touch the two buttons or slide on the 5-segment slider, each touch pad has a corresponding LED to indicate the touch status. Also we provide a default high interrupt pin, once you touch the button or slide the slider, it will comes to low.
It will be a lot fun to use this module as a game controler or apply it to other touch applications.
The product comes with a acrylic case, and we strongly recommend that you do not remove the case to use it. It may be triggered by mistake when your finger touches the trace or pad on the back.
Version
Product Version | Changes | Released Date |
---|---|---|
Grove - Capacitive Touch Slide Sensor(CY8C4014LQI) | Initial | Jul 2018 |
Features
- 32-bit MCU Subsystem
- 16-MHz ARM Cortex-M0 CPU
- Up to 16KB of flash with Read Accelerator
- Up to 2KB of SRAM
- Automatic hardware tuning (SmartSense™) over a sensor range of 5 pF to 45 pF
- I2C interface
Specification
Item | Value |
---|---|
Operating Voltage | 3.3V / 5V |
Operating Ambient Temperature | -40°C to +85°C |
Operating Junction Temperature | -40°C to +100°C |
Interface | I2C |
Default I2C Address | 0x08 |
Size | L: 60mm W: 20mm H: 6mm |
Weight | 8g |
Package size | L: 140mm W: 90mm H: 10mm |
Gross Weight | 15g |
Applications
- Game controller
- Touch applications
Hardware Overview
Pin Out
Schemaitc
Power
This module is based on CY8C4014LQI, the input voltage of this chip range from 1.71v-5.5v, so you can use both 3.3v and 5v pin of Arduino to supply for this module.
Platforms Supported
Arduino | Raspberry Pi | |||
---|---|---|---|---|
The platforms mentioned above as supported is/are an indication of the module's software or theoritical compatibility. We only provide software library or code examples for Arduino platform in most cases. It is not possible to provide software library / demo code for all possible MCU platforms. Hence, users have to write their own software library.
Getting Started
Play With Arduino
Hardware
Materials required
Seeeduino V4.2 | Base Shield | Grove - Capacitive Touch Slide Sensor |
---|---|---|
Get One Now | Get One Now | Get One Now |
1 Please plug the USB cable gently, otherwise you may damage the port. Please use the USB cable with 4 wires inside, the 2 wires cable can't transfer data. If you are not sure about the wire you have, you can click here to buy
2 Each Grove module comes with a Grove cable when you buy. In case you lose the Grove cable, you can click here to buy.
Step 1. Connect the Grove - Capacitive Touch Slide Sensor to port I2C of Grove-Base Shield.
Step 2. Plug Grove - Base Shield into Seeeduino.
Step 3. Connect Seeeduino to PC via a USB cable.
If we don't have Grove Base Shield, We also can directly connect this module to Seeeduino as below.
Seeeduino | Grove Cable | Grove - Capacitive Touch Slide Sensor |
---|---|---|
GND | Black | GND |
5V or 3.3V | Red | VCC |
SDA | White | SDA |
SCL | Yellow | SCL |
Software
If this is the first time you work with Arduino, we strongly recommend you to see Getting Started with Arduino before the start.
Step 1. Download the Grove_touch_sensor_CY8C40XX Library from Github.
Step 2. Refer to How to install library to install library for Arduino.
Step 3. Restart the Arduino IDE. Open the example, you can open it in the following three ways:
Open it directly in the Arduino IDE via the path: File --> Examples --> Grove_touch_sensor_CY8C40XX --> basic_demo.
Open it in your computer by click the basic_demo.ino which you can find in the folder XXXX\Arduino\libraries\Grove_touch_sensor_CY8C40XX-master\examples\basic_demo, XXXX is the location you installed the Arduino IDE.
Or, you can just click the icon in upper right corner of the code block to copy the following code into a new sketch in the Arduino IDE.
#include "Seeed_CY8C401XX.h"
#ifdef ARDUINO_SAMD_VARIANT_COMPLIANCE
#define SERIAL SerialUSB
#else
#define SERIAL Serial
#endif
CY8C sensor;
void setup()
{
SERIAL.begin(115200);
sensor.init();
}
void loop()
{
u8 value=0;
sensor.get_touch_button_value(&value);
SERIAL.print("button value is");
SERIAL.println(value,HEX);
if(value&0x01)
SERIAL.println("button 1 is pressed");
if(value&0x2)
SERIAL.println("button 2 is pressed");
sensor.get_touch_slider_value(&value);
SERIAL.print("slider value is");
SERIAL.println(value,HEX);
SERIAL.println(" ");
delay(1000);
}
The library file may be updated. This code may not be applicable to the updated library file, so we recommend that you use the first two methods.
Step 4. Upload the demo. If you do not know how to upload the code, please check How to upload code.
Step 5. Open the Serial Monitor of Arduino IDE by click Tool-> Serial Monitor. Or tap the ++ctrl+shift+m++ key at the same time. Set the baud rate to 115200.
If every thing goes well, when you open the Serial Monitor and touch the slide touch sensor, you will see the LED light up, and the Serial Monitor is shown below:
button value is1
button 1 is pressed
slider value is0
button value is3
button 1 is pressed
button 2 is pressed
slider value is9
Schematic Online Viewer
Resources
Tech Support & Product Discussion
Thank you for choosing our products! We are here to provide you with different support to ensure that your experience with our products is as smooth as possible. We offer several communication channels to cater to different preferences and needs.