Ks0031 keyestudio Capacitive Touch Sensor

From Keyestudio Wiki
Jump to: navigation, search

Introduction

Are you tired of clicking mechanic buttons? Well, try our capacitive touch sensor. You can find touch sensors mostly used on electronic device. So upgrade your Arduino project with this touch sensor to make it more cool.
This little sensor can sense the touch of body and metal with feedback of a high/low voltage level. Even isolated by some cloth and papers, it can still feel the touch. But its sensitivity will decrease as isolation layer gets thicker. We will make further improvement on those sensor modules to give you better experience.
thumb

Specification

  • Supply Voltage: 3.3V to 5V
  • Interface: Digital
  • Size: 30*20mm
  • Weight: 3g

Connection Diagram


thumb

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
}

Resources

Video

http://www.keyestudio.com/wp/ks0031/

PDF

https://drive.google.com/open?id=1IEYMxXBpD7jU1KyiP4AnSsh_o69iv0zK

Buy from

Official Website

http://www.keyestudio.com/keyestudio-capacitive-touch-sensor-for-arduino.html