Other Arduino Codes and Videos by Robojax

Using TTP223B touch module and relay to control AC/DC load with Arduino

دروس آردوینو به فارسی

TTP223B Capacitive Touch with Relay and AC load code

This video shows you how to turn AC load like bulb ON and off using TTP223B touch module with a relay. This demonstration and code will shows how to use it with Arduino and without arduino. You will also learn how to connect if your relay is different. The last section of the video shows you how to control the time, the AC bulb or load is ON. download the code and datasheet: http://robojax.com/learn/arduino/
  1. download TTP223B Capacitive Touch Manual
     * This is the Arduino code for TTP223B  Capacitive Touch switch with relay
     * the output pen 10 is connected to relay 
     * by touching the touch pad TTP223B or TTP223N-BA6 the relay will be turned ON
     * Written by Ahmad Nejrabi for Roboja Video
     * Date: Dec 04, 2017, in Ajax, Ontario, Canada
     * Permission granted to share this code given that this
     * note is kept with the code.
     * Disclaimer: this code is "AS IS" and for educational purpose only.
     int LD = 200; // Loop Delay. Controls how long after release the bulb is ON
    void setup() {
        // out pins
        pinMode(10, OUTPUT);// LED for button 1
        // input pins
        pinMode(2, INPUT);// Button 1 input pin 2  
        Serial.println("Robojax Test: TTP223B touch");
    void loop() {
        // button 1 action
          Serial.println("Button Touched "); 
          digitalWrite(10, LOW); // Turn the LED ON     
          digitalWrite(10, HIGH);// Turn OFF the LED
    }// loop

    If you found this tutorial helpful, please support me so I can continue creating content like this. support me via PayPal