edit

Grove - Touch Sensor

Grove - Touch Sensor enables you to replace press with touch. It can detect the change in capacitance when a finger is near by. That means no matter your finger directly touches the pad or just stays close to the pad, Grove - Touch Sensor would outputs HIGH also.

Specifications

  • Operating Voltage: 2.0 - 5.5V
  • Operating Current(Vcc=3V):1.5 - 3.0μA
  • Operating Current(VDD=3V):3.5 - 7.0μA
  • Output Response Time: 60 - 220mS
  • Used Chipset: TTP223-BA6

Tip

More details about Grove modules please refer to Grove System

Platforms Supported

Arduino Raspberry Pi BeagleBone Wio LinkIt ONE

Caution

The platforms mentioned above as supported is/are an indication of the module's hardware 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.

Option features

AHLB TOG LPMB MOTB SLRFTB RST Q OPDO
Output Active High / Low Toggle mode Power Mode Max. On Time Sampling length RESET PIN CMOS Output Open Drain Mode
V V 0 1 1 X V X
Active High Disabled LOW Infinite 1.6 msec N/A Present N/A

Getting started

Play with Arduino

This demo is going to show you how to turn on/off an LED.

Hardware

  • Step 1. Prepare the below stuffs:
Seeeduino V4.2 Base Shield Grove-Touch_Sensor Grove-LED
enter image description here enter image description here enter image description here enter image description
Get One Now Get One Now Get One Now Get One Now
  • Step 2. Connect Grove-Touch_Sensor to port D2 of Grove-Base Shield.
  • Step 3. Connect Grove-LED to port D3 of Grove-Base Shield.
  • Step 4. Plug Grove - Base Shield into Seeeduino.
  • Step 5. Connect Seeeduino to PC via a USB cable.

with_ardu

Software

  • Step 1. Please copy and paste code below to a new Arduino sketch.
     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    const int TouchPin=2;
    const int ledPin=3;
    
    void setup() {
        pinMode(TouchPin, INPUT);
        pinMode(ledPin,OUTPUT);
    }
    
    void loop() {
        int sensorValue = digitalRead(TouchPin);
        if(sensorValue==1)
        {
            digitalWrite(ledPin,HIGH);
        }
        else
        {
            digitalWrite(ledPin,LOW);
        }
    }
    
    Step 2. Monitor the led on and off.

Play With Raspberry Pi

Hardware

  • Step 1. Prepare the below stuffs:
Raspberry pi GrovePi_Plus Grove-Touch_Sensor
enter image description here enter image description here enter image description here
Get One Now Get One Now Get One Now
  • Step 2. Plug the GrovePi_Plus into Raspberry.
  • Step 3. Connect Grove-Touch_Sensor to D2 port of GrovePi_Plus.
  • Step 4. Connect the Raspberry to PC through USB cable.

with_rpi

Software

  • Step 1. Follow Setting Software to configure the development environment.
  • Step 2. Git clone the Github repository.
1
2
cd ~
git clone https://github.com/DexterInd/GrovePi.git
  • Step 3. Excute below commands to use this sensor, please change the port to from D4 to D2.
1
python grove_touch_sensor.py

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/usr/bin/env python
#
# GrovePi Example for using the Grove Touch Sensor (http://www.seeedstudio.com/wiki/Grove_-_Touch_Sensor)
#
# The GrovePi connects the Raspberry Pi and Grove sensors.  You can learn more about GrovePi here:  http://www.dexterindustries.com/GrovePi
#
# Have a question about this example?  Ask on the forums here:  http://forum.dexterindustries.com/c/grovepi
#
'''
## License
The MIT License (MIT)
GrovePi for the Raspberry Pi: an open source platform for connecting Grove Sensors to the Raspberry Pi.
Copyright (C) 2017  Dexter Industries
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
'''
import time
import grovepi

# Connect the Grove Touch Sensor to digital port D2
# SIG,NC,VCC,GND
touch_sensor = 2

grovepi.pinMode(touch_sensor,"INPUT")

while True:
    try:
        print(grovepi.digitalRead(touch_sensor))
        time.sleep(.5)

    except IOError:
        print ("Error")
Here is result:

Resources

Projects

Using Grove Touch Sensor To Control Grove LED: How to connect and use Grove Touch Sensor to control Grove LED socket kit.

Touch sensor Grove module:

Tech Support

Please submit any technical issue into our forum.