Reference: RBD-2381
Brand: Hi-Link
Banner

As the name suggests the Knock Sensor Module produces the Digital output on the detection of Knock i.e. vibration stroke. Further, the change in voltage level can be manipulated to produce the desired output and can be used in a variety of applications. Featured By RoboticsBD.
Product Images are shown for illustrative purposes only and may differ from the actual product.
RoboticsBD RoboticsBD RoboticsBD RoboticsBD RoboticsBD RoboticsBD RoboticsBD RoboticsBD RoboticsBD RoboticsBD
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 (Sensor) ; // The current signal at the sensor will be read
if (val == HIGH) // If a signal was detected , the LED will light up
{
digitalWrite (Led, LOW);
}
else
{
digitalWrite (Led, HIGH);
}
}Connections with Arduino:
# Needed modules will be imported and configured
import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM)
# The input pin of the sensor will be declared. Additional to that the pull up resistor will be activated
GPIO_PIN = 24
GPIO.setup(GPIO_PIN, GPIO.IN)
print "Sensor-Test [press ctrl+c to end]"
# This output function will be started at signal detection
def outFunction(null):
print("Signal detected")
# At the moment of detection a signal (falling signal edge) the output function will be activated.
GPIO.add_event_detect(GPIO_PIN, GPIO.FALLING, callback=outFunction, bouncetime=100)
# main program loop
try:
while True:
time.sleep(1)
# Scavenging work after the end of the program
except KeyboardInterrupt:
GPIO.cleanup()
Connections with Raspberry Pi:
RoboticsBD RoboticsBD RoboticsBD RoboticsBD RoboticsBD RoboticsBD RoboticsBD RoboticsBD RoboticsBD RoboticsBD
| General Specification | |
| Operating voltage (v) | 3.3 ~ 5 |
| Default Output | High |
| Output Type | Digital |
| Length (mm) | 19.5 |
| Width (mm) | 16 |
| Height (mm) | 7.5 |
| Weight (gm) | 1 |
| Shipment Weight | 0.01 kg |
| Shipment Dimensions | 4 × 2 × 1 cm |
Please allow 5% measuring deviation due to manual measurement.
RoboticsBD RoboticsBD RoboticsBD RoboticsBD RoboticsBD RoboticsBD RoboticsBD RoboticsBD RoboticsBD RoboticsBD
1 x The Knock Sensor Module.
RoboticsBD RoboticsBD RoboticsBD RoboticsBD RoboticsBD RoboticsBD RoboticsBD RoboticsBD RoboticsBD RoboticsBD
RoboticsBD RoboticsBD RoboticsBD RoboticsBD RoboticsBD RoboticsBD RoboticsBD RoboticsBD RoboticsBD RoboticsBD
Specific References
Your review appreciation cannot be sent
Report comment
Report sent
Your report cannot be sent
Write your review
Review sent
Your review cannot be sent
Reference: RBD-2381
Brand: Hi-Link
Reference: RBD-2346
Reference: RBD-2348
Reference: RBD-0693
Reference: RBD-2443
Reference: RBD-1197
Reference: RBD-1111
Reference: RBD-1677
Reference: RBD-0233
Brand: SparkFun Electronics
We'll slide into your inbox when the product is back in stock.
Reference: RBD-0958
Reference: RBD-0431
Reference: RBD-0426
Reference: RBD-2339
Reference: RBD-1209
Reference: RBD-1424
Reference: RBD-0691
Reference: RBD-0152
Reference: RBD-0023
Reference: RBD-0348
Reference: 0245
Reference: RBD-0291
Reference: RBD-0685
Reference: RBD-0415
Reference: RBD-0415
Reference: RBD-1249
Reference: RBD-0152
Reference: RBD-0420
Reference: RBD-1740
check_circle
check_circle