Aanraakgevoelige sensor Module

Aanraakgevoelige sensor Module
Euro 3.95 *Prijzen zijn inclusief btw
ArtikelcodeARD138
Aanraakgevoelige sensor Module. Geschikt voor Arduino maar ook voor andere microcontrollers.

Op voorraad / on stock
Aanraakgevoelige sensor Module. Geschikt voor Arduino maar ook voor andere microcontrollers.

Example code:

Use the LED comes with digital pin 13, and connect the shock sensor output to digital pin 3, when the shock sensor senses vibration, LED will blink.

int Led=13;

int Shock=3

int val;

void setup()

{

pinMode(Led,OUTPUT);

pinMode(Shock,INPUT);//

}

void loop()

{

val=digitalRead(Shock);

if(val==HIGH)/

{

digitalWrite(Led,LOW);

}

else

{

digitalWrite(Led,HIGH);

}

}