- Touch Sensor enables you to replace press with touch.
- It can detect the change in capacitance when a finger is near by.
- That means no matter your finger directly touches the pad or just stays close to the pad.
- Touch Sensor would outputs HIGH also.
Figure 1: Touch Sensor
Connection
Step 1: Connection From ArduinoMega To Touch Sensor,
- Connect the SIG pin to Ao of the Analog pin to the Board
- Connect the VCC pin to 5v of the Arduino Board
- Connect the GND pin to Gnd of the Arduino Board.
Step 2: Connection From ArduinoMega To LED,
- Connect the postive side to 02 of board
- Connect the negative side to GNd of board.
Programming
- void setup()
- {
- pinMode(2, OUTPUT);
- }
- void loop()
- {
- if(analogRead(A0) > 600)
- {
- digitalWrite(2, HIGH);
- }
- else
- digitalWrite(2, LOW);
- delay(100);
- }
Explanation
- In this article I explained about the Working With Touch Sensor By Using In ArduinoMega.
- It can clearly display the output on the LED blink
- When we touch the sensor it will glow high automatically.
Output
Figure 2: Output