Ks0114 keyestudio EASY plug Knock Sensor: Difference between revisions
Jump to navigation
Jump to search
Keyestudio (talk | contribs) |
Keyestudio (talk | contribs) |
||
Line 49: | Line 49: | ||
==Buy from == | ==Buy from == | ||
'''Official Website''' | |||
http://www.keyestudio.com/keyestudio-easy-plug-knock-sensor-module-for-arduino.html | http://www.keyestudio.com/keyestudio-easy-plug-knock-sensor-module-for-arduino.html | ||
[[category:Module]] | [[category:Module]] |
Revision as of 11:49, 15 November 2017
EASY plug Knock Sensor
Introduction
This module is a knock sensor. When you knock it, it can send a momentary signal. You can combine it with Arduino to make some interesting experiments, e.g. electronic drum.
Note: this module needs to be used together with EASY plug control board.
Specification
- Interface: Easy plug
- Working voltage: 5V
- Sensor type: digital
- Size: 38*20mm
- Weight: 5g
Connection Diagram
Sample Code
int Led=13;//define LED interface int Shock=8//define knock sensor interface; int val;//define digital variable val void setup() { pinMode(Led,OUTPUT);//define LED to be output interface pinMode(Shock,INPUT);//define knock sensor to be output interface } void loop() { val=digitalRead(Shock);//read the value of interface8 and evaluate it to val if(val==HIGH)//when the knock sensor detect a signal, LED will be flashing { digitalWrite(Led,LOW); } else { digitalWrite(Led,HIGH); } }
Resources
Datasheet
http://www.keyestudio.com/files/index/download/id/1464066396/
Buy from
Official Website
http://www.keyestudio.com/keyestudio-easy-plug-knock-sensor-module-for-arduino.html