Skip to main content


Knock Module Arduino Compatible

Arduino Compatible ARD2 Knock Module


1 $3.95


This knock sensor can detect knocks and impacts. It can be used to build a simple LED circuit which lights up when an impact is detected. It has potential applications wherever you might want your project to respond to sudden impacts for safety purposes or simply as a unique input method.

Note: If your project requires a more sensitive module, see the ARD2-2202.

Test Code

int Led = 13; // define LED Interface
int Shock = 3; // define the percussion Sensor Interface
int val; // define numeric variables val

void setup () {
pinMode(Led, OUTPUT); // define LED as output interface
pinMode(Shock, INPUT); // define knock sensor output interface

void loop () {
val = digitalRead(Shock); // read digital interface is assigned a value of 3 val

// When the percussion when the sensor detects a signal, LED flashes
if (val == HIGH) {
digitalWrite(Led, LOW);
else {
digitalWrite (Led, HIGH);


  • Make an external LED light up when the sensor detects a knock/impact
  • Add a unique input to your project or respond to sudden impacts as a safety feature







You Might Also Like

All prices are in Australian Dollars and include GST. GST will be removed from your order if you are ordering from outside Australia.
Products may differ from pictured.
All trademarks and trade names are the properties of their respective owners. Wiltronics disclaims any proprietary interest in trademarks and trade names other than its own.

Knock Module Arduino Compatible



We use cookies to ensure you have the best experience on our site. If you continue to use this site you consent to the use of these cookies. OK

Find out more in our Privacy Policy