Touch Sensor
Touch Sensor
www.bluesail.co.in
[email protected]
2
Digital Reading /
Writing
Touch Sensor
3
It is used in many smart lamps and wall switches that have a metal exterior as well as on
public computer terminals.
4
Code
#define touchsensor 1
void setup() {
pinMode(touchsensor, INPUT);
Serial.begin(9600);
void loop() {
if (digitalRead(touchsensor) == HIGH)
Serial.println("Sensor is touched");
delay(500);
}
7
www.bluesail.co.in
[email protected]