Skip to content

DFRobot_Capacitive_Touch_Sensor_(SKU_DFR0030)

Angelo edited this page Sep 21, 2016 · 3 revisions

Introduction

DFRobot Capacitive Touch Sensor ( left:Front, right:Back) this is the dfrobot capacitive touch sensor. this sensor can sense the human body and metal, when they touch the sensor. in addition to this, the detection works even when separated by plastic, glass and other materials. in combination with arduino boards, the sensors can be used to create very interesting and interactive projects.

Specification

  • Plug & Play
  • Can sense the human body and metal
  • Works well with arduino boards
  • Weight: 3 grams

Pin Definition

Touch Sensor module pin definition :

:#Input

:#Power

:#GND

Caution:For the old revision the jumpers work like this:

  1. With jumper connected:

It will output digital high,when you touch

  1. With jumper NOT connected:

It will behave like a switch or button, touch once and it will be high until you touch it again

digital input module

Connection Diagram

Digital module connection diagram

Sample Code

int ledPin = 13;                // Connect LED on pin 13, or use the onboard one
int KEY = 2;                 // Connect Touch sensor on Digital Pin 2

void setup()
{
  pinMode(ledPin, OUTPUT);      // Set ledPin to output mode
  pinMode(KEY, INPUT);       //Set touch sensor pin to input mode
}
void loop()
{
   if(digitalRead(KEY)==HIGH)       //Read Touch sensor signal

     {
        digitalWrite(ledPin, HIGH);   // if Touch sensor is HIGH, then turn on
     }
   else
     {
        digitalWrite(ledPin, LOW);    // if Touch sensor is LOW, then turn off the led
     }
}

image:nextredirectltr.pngGo shopping dfrobot capacitive touch sensor (sku:dfr0030)

category: Product Manual category: DFR Series category: Sensors category:source category:Diagram

Clone this wiki locally