Leírás
Both knock sensor module and digital interface 13 carries LED for the build-up of a simple circuit and a knock flasher.Connect knock sensor to digital interface 3 with the LED carried by digital interface 13. When knock sensor detects a knock signal, the LED will flash.
Sample code:
int Led=13;//define LED interface
int Shock=3//define knock sensor interface
int val;// define digital variable val
void setup(){
pinMode(Led,OUTPUT);//define LED as output interface
pinMode(Shock,INPUT);//define knock sensor as output interface
}
void loop(){
val=digitalRead(Shock);//read and assign the value of digital interface 3 to val
if(val==HIGH)//When knock sensor detects any signal , the LED will flash {
digitalWrite(Led,LOW);
}else{
digitalWrite(Led,HIGH);
}
}
Videók
Műszaki adatlapok
További információk
Értékelések
Amit rólunk mondanak
Hasonló Termékek
-
Csak 8 a készleten
-
Kiszállitás: 2026-04-22
8 készleten



























































