Introduction: Interfacing of Metal Touch Sensor Module and Arduino Uno

In this project, we will employ Metal Touch Sensor module and Arduino to detect and show if a metal piece of the sensor is touched or not.

Step 1: About the Metal Touch Sensor:

Metal Touch sensor will generate certain output on touching metal spike of the sensor. Measured input from Sensor is then fed to the amplifier. Amplifier then sends analog data to the analog output pin of the module. In this, we are going to interface LED using the Metal Touch Sensor module.

Step 2: Components Required:

Arduino board 1

Metal touch sensor 1

Jumper wires 6

Breadboard1

LED 1

You can buy all these products from www.elegocart.com

Step 3: Project Setup:

Step 4: Code:

const int SensorPin=7;//const int SensorPin=7;//Level input ports
const int analogIn = A0; const int ledPin = 13;

int SensorState=0; int analogVal = 0;

void setup() { pinMode(SensorPin,INPUT); pinMode(ledPin,OUTPUT); }

void loop() { analogVal = analogRead(analogIn); SensorState=digitalRead(SensorPin); if(SensorState==HIGH) { digitalWrite(ledPin,HIGH); } else { digitalWrite(ledPin,LOW); } }

CLICK: