Introduction
This module is a knock sensor. When you knock it, it can send a momentary signal. We can combine it with Arduino to make some interesting experiment, e.g. electronic drum
Specification
- Working voltage: 5V
- Size: 30*20mm
- Weight: 3g
Connection Diagram
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 to be output interface pinMode(Shock,INPUT);//define knock sensor to be output interface } void loop() { val=digitalRead(Shock);//read the value of interface3 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); } }
Tutotials Overview
- Arduino Project 1: Hello World
- Arduino Project 2: LED blinking
- Arduino Project 3: PWM
- Arduino Project 4: Traffic light
- Arduino Project 5: LED chasing effect
- Arduino Project 6: Button-controlled LED
- Arduino Project 7: Responder experiment
- Arduino Project 8: Active buzzer
- Arduino Project 9: Passive buzzer
- Arduino Project 10: White LED Module
- Arduino Project 11: Passive Buzzer module
- Arduino Project 12: Knock Sensor Module
- Arduino Project 13: Digital Tilt Sensor
- Arduino Project 14: DS18B20 Temperature Sensor
- Arduino Project 15: Digital IR Receiver Module
- Arduino Project 16: Digital IR Transmitter Module
- Arduino Project 17: Capacitive Touch Sensor
- Arduino Project 18: Analog Alcohol Sensor
- Arduino Project 19: Infrared Obstacle Avoidance Sensor
Buy Sensor Starter Kit-K1 For Arduino Education Learning Programming
https://drive.google.com/open?id=1GGebaeu7kf7nhjiadoBD3x9FIgQzxgzh