Sanyam Chugh
Published

LED glow by touch sensor

Can you think of an apparatus ,in which ,if you touch it ,it glows the LED ? Let's think about it

BeginnerShowcase (no instructions)19
LED glow by touch sensor

Code

Touch Sensor

Arduino
An awesome era ,it would be ,if you touch a pad and led glows :)
int ledPin=8;
int thresholdValue = 400;
void setup() {
Serial.begin(9600);
pinMode(ledPin,OUTPUT);

}

void loop() {
int sensorValue = analogRead(A0);
Serial.println(sensorValue);
if(sensorValue>thresholdValue)
digitalWrite(ledPin,HIGH);
delay(200);
digitalWrite(ledPin,LOW);
}

Credits

Sanyam Chugh
13 projects • 2 followers
Contact

Comments

Please log in or sign up to comment.