Created on: 2 August 2012
A piezo sensor is connected to analog pin A0 of the Arduino. When the sensor is knocked or tapped, the on board "L" LED will light up and the message "Knock!" is sent out of the serial port for display in the Arduino IDE serial monitor window.
File → Examples → 6.Sensors → Knock
The circuit diagram and breadboard connections can be found on the Knock Arduino website page.
Find the sketch for this project under File → Examples → 6.Sensors → Knock in the Arduino IDE and upload it to the Arduino board.
Open the serial monitor window in the Arduino IDE. Tap or knock on the piezo sensor to see the on-board LED light up and the "Knock!" message sent to the serial monitor window.
Can't see the video? View on YouTube →