Touch Module Sensor

Touch Module

  • $3.85


Potentiometer Code


/* SETUP

Touch Sensor    Arduino
VCC       -     5V
GND       -     GND
SIG       -     D3
*/
 
int TouchSensor = 3;    //connected to digital pin D3
int led = 13;
void setup(){
Serial.begin(9600);   // communication speed
  pinMode(led, OUTPUT);
  pinMode(TouchSensor, INPUT);
}

void loop(){
  if(digitalRead(TouchSensor)==HIGH)    //read touch sensor signal
   { 
    digitalWrite(led, HIGH);    // if touch sensor is HIGH, then turn on led
    Serial.println("1");
   }
  else
   {
    digitalWrite(led, LOW);   // if touch sensor is LOW, then turn off the led
    Serial.println("0");
   }
  delay(50);    // Slow down the output for easier reading
}

We Also Recommend


where to buy touch sensors in toronto

touch sensor toronto

buy touch sensor toronto