Touch Sensor

SRJT10105

Jugaadu's Mother has bought a piece of new gold jewellery set for herself. She kept them in her Safe box. To make it safer, Jugaadu wants to have an alarm system which gives an alarm on being touched by someone else. How can Jugaadu make a secure Locker?

  1. Arduino UNO
  2. Arduino UNO Cable (A to B)
  3. RGB LED
  4. Jumper Wires
  5. Touch Sensor
We can make use of touch sensor based Arduino UNO system. As soon as the touch sensor recognises the touch, the circuit gets closed and current starts flowing in the circuit that is read by Arduino UNO, then Arduino UNO will glow the LED as its output.

    int led_pin=13;
int sig_pin=7;

void setup(){
pinMode(led_pin,OUTPUT);
pinMode(sig_pin,INPUT);
}

void loop() {
    if(digitalRead(sig_pin))
     {
     digitalWrite(led_pin,HIGH);
     }
    else{
     digitalWrite(led_pin,LOW);
     }
}