ข้อมูล
น้ำหนัก
บาร์โค้ด
ลงสินค้า
อัพเดทล่าสุด
รายละเอียดสินค้า

4-channel TTP224 capacitive touch module digital touch sensor human body touch switch TTP224 ปุ่มกดแบบสัมผัส 4 ช่อง


1. Onboard TTP224 capacitive 4-button touch sensing IC 


2. Onboard 4-channel level status indicator 

3. Working voltage: 2.4V-5.5V

4, the module can set the output mode, key output mode, maximum output time and fast / low power selection 

5, PCB board size: 35 (mm) x 29 (mm)

Code:

/*

 * This is the Arduino code for TTP 224 4 Channel Capacitive Touch switch 

 * the output pen 10, 11, 12 and 13 will be ON when key 1 to 4 are pressed respectively

 * pressing button 1, Turns pin 10 ON

 * pressing button 2, Turns pin 11 ON

 * pressing button 3, Turns pin 12 ON

 * pressing button 4, Turns pin 13 ON

 * 

 * Written by Ahmad Nejrabi for Roboja Video

 * Date: Dec 02, 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. Do not change.

void setup() {

    Serial.begin(9600);

    // out pins

    pinMode(10, OUTPUT);// LED for button 1

    pinMode(11, OUTPUT);// LED for button 2

    pinMode(12, OUTPUT);// LED for button 3

    pinMode(13, OUTPUT);// LED for button 4            

    // input pins

    pinMode(2, INPUT);// Button 1 input pin 2  

    pinMode(3, INPUT);// Button 2 input pin 3  

    pinMode(4, INPUT);// Button 3 input pin 4  

    pinMode(5, INPUT);// Button 4 input pin 5              

  }

void loop() {

    // button 1 action

    if(digitalRead(2)){

      Serial.println("Button 1 Touched "); 

      digitalWrite(10, HIGH); // Turn the LED ON     

      delay(LD); 

    }else{

      digitalWrite(10, LOW);// Turn OFF the LED

    }

    // button 2 action

    if(digitalRead(3)){

      Serial.println("Button 2 Touched "); 

      digitalWrite(11, HIGH); // Turn the LED ON

      delay(LD); 

    }else{

      digitalWrite(11, LOW);// Turn OFF the LED

    }   

    // button 3 action

    if(digitalRead(4)){

      Serial.println("Button 3 Touched "); 

      digitalWrite(12, HIGH); // Turn the LED ON       

      delay(LD); 

    }else{

      digitalWrite(12, LOW);// Turn OFF the LED

    }     

   // button 4 action

    if(digitalRead(5)){

      Serial.println("Button 4 Touched "); 

      digitalWrite(13, HIGH); // Turn the LED ON      

      delay(LD); 

    }else{

      digitalWrite(13, LOW);// Turn OFF the LED

    }

}

เงื่อนไขอื่นๆ
Tags

วิธีการชำระเงิน

บมจ. ธนาคารกรุงไทย สาขาโรงไฟฟ้าบางปะกง ออมทรัพย์
ธนาคารกรุงเทพ จำกัด (มหาชน) สาขาบิ๊กซี ฉะเชิงเทรา 2 ออมทรัพย์
บมจ. ธนาคารกรุงไทย สาขาบิ๊กซี ฉะเชิงเทรา 2 ออมทรัพย์
พร้อมเพย์ สาขา- -
Scan this!
สนธยา ใจผ่อง
063-xxxxxx-8
Accept All Banks | รับเงินได้จากทุกธนาคาร
พูดคุย-สอบถาม