Digital Touch Sensor Module Capacitive Switch [S243]





https://www.youtube.com/watch?v=p1z_nWX7cvg


*GitHub https://github.com/rdiot/rdiot-s243.git


* Specs

Features:
Low power consumption
Power supply for 2.5-5.5V DC
The module is based on a touch-sensing capacitive touch switch module. In the normal state, the module output low, low power consumption; When a finger touches the corresponding position, the module output high, if not touched for 12 seconds, switch to low-power mode.

Specifications:
Color: Blue
Module size:1.4*1.4cm
Modes: jog, self-locking

Package includes:
1 x Digital Touch Sensor Module



* Contents

- Connect

VCC ----- 5V

Middle ----- GND

OUT ----- D2


- Key Code

int touchPin = 2; 

 

void setup() {

  Serial.begin(9600);

  pinMode(touchPin, INPUT);  

}

 

void loop() {

  int touchValue = digitalRead(touchPin);

  Serial.println(touchValue);

 

  delay(100);  

}

Posted by RD IoT RDIoT
TAG touch

댓글을 달아 주세요

Metal Touch Sensor Module [S042] 



https://www.youtube.com/watch?v=rF92w77SAuI


*GitHubhttps://github.com/rdiot/rdiot-s042.git


* Specs

Color: red

Main chip: LM393

Operating voltage: DC 5V

Light weight design

With single channel signal output

Low level output signal used for human body touch sensor alarm

Compatible with Arduino



* Contents

- Connect

A0 ----- X

G ----- GND

+ ----- 5V

D0 ----- D2


- Key Code

#include <Wire.h> 

#include <LiquidCrystal_I2C.h>

 

int pin = 2;

 

LiquidCrystal_I2C lcd(0x27,20,4);  // LCD2004

 

void setup()

{

  lcd.init();  // initialize the lcd 

  lcd.backlight();

  lcd.print("start LCD2004");

 

  pinMode(pin,INPUT);

  delay(1000);

 

  lcd.clear();

}

 

void loop()

{

 

  lcd.setCursor(0,0);

  lcd.print("S042:Metal Touch");

 

  int val = digitalRead(pin);

 

  lcd.setCursor(0,1);

  lcd.print("digital=" + (String)val + " ");

 

  if(true == IsTouchec(pin))

  {

    lcd.setCursor(0,2);

    lcd.print("IsTouch=Touched   ");

  }

  else

  {    

    lcd.setCursor(0,2);

    lcd.print("IsTouch=None    ");

  }

 

}

 

bool IsTouchec(int p)

{

 int time = 0;

 do

 {

   if (HIGH == digitalRead(p)) return true;

   delay(1);

 } while (time++<15);

 return false;

}

Posted by RD IoT RDIoT

댓글을 달아 주세요

Catalex Capacitive Touch Sensor (TTP223B) [S009]



https://www.youtube.com/watch?v=ITHiTfEC2CE


*GitHubhttps://github.com/rdiot/rdiot-s009.git



* Specs

This device uses your body as part of the circuit.  When you touch the sensor pad, the capacitance of the circuit is changed and is detected.  That detected change in capacitance results in the output changing states.

When I first got this,  I expected a glitchy device,  that while functional,  would occasionally have unpredictable output results.

I may have been wrong.   After playing for a few hours, I can’t seem to get it to do anything other than what I expected it to do.  If you’re looking for robust user input,  this might do the trick.



* Contents

- Key Code

#define ctsPin 14 // Pin for capactitive touch sensor

 

int ledPin = 13; // pin for the LED

 

void setup() {

  Serial.begin(9600);

  pinMode(ledPin, OUTPUT);  

  pinMode(ctsPin, INPUT);

}

 

void loop() {

  int ctsValue = digitalRead(ctsPin);

  if (ctsValue == HIGH){

    digitalWrite(ledPin, HIGH);

    Serial.println("TOUCHED");

  }

  else{

    digitalWrite(ledPin,LOW);

    Serial.println("not touched");

  } 

  delay(100);

  

}

Posted by RD IoT RDIoT

댓글을 달아 주세요