Hello world! Today i made a code for the ttp223b capacitive touch sensor. A sensor that i am testing for my webshop, and it does its job! So soon i will add it to my webshop at arduinosensors.nl. The code is really easy and can be used with normal buttons to. Follow the next step for the schematic, code & parts list.

Step 1: Schematic Code & Parts List.

It is very easy, Just wire it up like the schematic and upload the code.

Parts list:

  1. Arduino uno, I used the RobotDyn Uno.
  2. KY-019 Relay
  3. TTP223B Capacitive touch sensor.
  4. Jumper wire set MM/FF/MF
  5. Lamp socket + power cable & light bulb (optional)

Good luck!

Follow me for more!

Check out my website arduinosensors.nl

<p>Hello <a href="https://www.instructables.com/member/vandenbrande/" rel="nofollow">vandenbrande</a> !!!!! i made it , thanks to you for the codes and schematic. Now am trying to make a 4 channel touch relay control. Can you help me with the code ?</p>
<p>can the touch sensor work by not installing relay ?</p>
<p>Forgot to push reply button ;D </p>
<p>Works without relay as well. </p><p>#define TouchSensor 10 // Pin for capactitive touch sensor</p><p>boolean currentState = LOW;</p><p>boolean lastState = LOW;</p><p>int counter = 0;</p><p>void setup() {</p><p> Serial.begin(9600);</p><p> pinMode(TouchSensor, INPUT);</p><p>}</p><p>void loop() {</p><p> currentState = digitalRead(TouchSensor);</p><p> if (currentState == HIGH &amp;&amp; lastState == LOW){</p><p> counter++;</p><p> Serial.print(&quot;Button pressed: &quot;);</p><p> Serial.print(counter);</p><p> Serial.print(&quot; times!&quot;);</p><p> Serial.println(&quot;||&quot;);</p><p> //delay(1);</p><p> }</p><p> lastState = currentState;</p><p>}</p>
<p>Follow me for more!</p>

About This Instructable




Bio: Hello world! I make simple & Advanced projects for people who want to learn programming and electronics. Most of my Instructables are about arduino and the ... More »
More by vandenbrande:Arduino - LCD 20x4 Water LEVEL MONITOR HC SR04 Arduino - NRF24L01 2.4Ghz Wireless Relay Switch RGB led STRIP control Arduino Android BLUETOOTH - SMD5050  
Add instructable to: