KY-031 |
Part Number | KY-031 |
Manufacturer | Joy-IT |
Description | ..... 1 3 Pinout ...... |
Features |
connected.
Export: 16.06.2017
Copyright by Joy-IT - Published under CC BY-NC-SA 3.0
Page 140 of 214
KY-031 Knock-sensor module
Pinout
Code example Arduino
This example will light up a LED after the sensor detected a knock or vibration. The modules KY-011, KY-016 or KY-029 can be used as an LED.
int Led = 13 ;// Declaration of the LED output pin int Sensor = 10; // Declaration of the sensor input pin int val; // Temporary variable void setup () {
pinMode (Led, OUTPUT) ; // Initialization output pin pinMode (Sensor, INPUT) ; // Initialization sensor pin } void loop () { val = digitalRead ... |
Document |
KY-031 Data Sheet
PDF 351.64KB |
Similar Datasheet