Wish List 0

Heltec Httm Series Illuminated Capacitive Touch Switch Button Module 2.7V 6V

Rs. 42.00 Rs. 48.00

-HTTM is HelTec Touch Model shorthand;
 
-HTDS-SCR: unmarried bond, the traditional version, red backlit contact module
 
-In the excessive-capability, utility of transportable media players and cellular handsets and other high visibility of the product, contact the button has been broadly adopted.
-Because of its smooth to use, fashionable and low-price blessings, increasingly more digital products began to shift from the conventional mechanical buttons touch buttons."



Key Number
S- bond, D- double, T- triple bond, F- 4 constructed;                                                     
Version attribute

 C- traditional model, S- Special Edition (custom designed model);    
Backlight color
 B- blue, R- crimson, G- yellow-inexperienced

PACKAGE INCLUDES:

1 PCS x Heltec Httm Series Illuminated Capacitive Touch Switch Button Module 2.7V 6V


//SOURCE CODE TAKEN FROM BELOW LINK

//https://forum.arduino.cc/index.php?topic=524138.0

bool bButtonPressed = false;

uint8_t nButtonPin = 2, nLEDPin = 10;

uint16_t nOnTime = 0, nOffTime = 0;


void touchSwitchISR()

{

    noInterrupts();

    bButtonPressed = true;

}


void setup()

{

  pinMode(nLEDPin, OUTPUT);

  pinMode(nButtonPin, INPUT);

  attachInterrupt(digitalPinToInterrupt(nButtonPin ), touchSwitchISR, RISING);

}


void loop()

{

    if (bButtonPressed))

    {

         if (nOnTime == 0)

         {

             nOnTime = millis() + 10/*seconds*/ * 1000 /*milliseconds per second*/

             digitalWrite(nLEDPin, HIGH);

         }

         else

         {

             if (millis() >= nOnTime)

             {

                  digitalWrite(nLEDPin, LOW);

                  nOnTime = 0;

                  bButtonPressed = false;

                  interrupts();

             }

         }

    }

}

15 DAYS

Write a review

Please login or register to review