Posts

Showing posts with the label TTP223B

Interfacing an LED, a buzzer and TTP223 Capacitive Touch Sensor with Arduino Uno

Image
Components Required: 1. Arduino Uno Board 2. TTP223 Capacitive Touch Sensor 3. LED or Buzzer 4. Breadboard 5. Connecting Wires Do the connection as follows: Sig Pin  of TTP223 Capacitive Touch Sensor - Arduino  Digital Pin D7 Vcc Pin  of TTP223 Capacitive Touch Sensor - Arduino  5V  GND Pin  of TTP223 Capacitive Touch Sensor- Arduino  GND  LED positive pin - Arduino  Digial Pin D13 LED negative pin - Arduino  Ground Pin Source Code: #define ctsPin 7 // 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); ...

Controlling an LED using an Arduino Compatible TTP223B Capacitive Touch Sensor.

Image
This project was developed with the intention of replacing the traditional button key. It can be used along with a microcontroller or an arduino. When a capacitive load (such as a human hand) is in close proximity to the sense-pad or touches it, the sensor detects the change in capacitance and activates the switch. Code: #define  ctsPin 2  int ledPin = 13; 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");   }   ...