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

Demonstration

With Arduino

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

Demo Code:

const int TouchPin=9;
const int ledPin=12;

void setup() {
    pinMode(TouchPin, INPUT);
    pinMode(ledPin,OUTPUT);
}

void loop() {
    int sensorValue = digitalRead(TouchPin);
    if(sensorValue==1)
    {
        digitalWrite(ledPin,HIGH);
    }
    else
    {
        digitalWrite(ledPin,LOW);
    }
}

With Raspberry Pi

  1. You should have a raspberry pi and a grovepi or grovepi+.
  2. You should have completed configuring the development environment, otherwise follow here.
  3. Connection

    • Plug the sensor to grovepi socket D4 by using a grove cable.
  4. Navigate to the demos' directory:

    cd yourpath/GrovePi/Software/Python/
  • To see the code

    nano grove_touch_sensor.py   # "Ctrl+x" to exit #
    import time
    import grovepi

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

    grovepi.pinMode(touch_sensor,"INPUT")

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

        except IOError:
            print "Error"

5.Run the demo.

    sudo python grove_touch_sensor.py

Resources

Tech Support

Please do not hesitate to contact techsupport@seeed.cc if you have any technical issue. Or submit the issue into our forum.