The new Sound and Buzzer Module is quite versatile, and can be used for either input or output.
Piezo elements have an obvious application as sound-generating devices, and by connecting the module to a PWM output on your Arduino you can generate tones. However, with the inclusion of a 1M resistor across the terminals (pre-fitted on the module for convenience) it can also be used as a knock sensor. Just connect the module between GND and an analog input and you can detect sharp bumps, taps, or knocks!
Examples are provided in the Sound and Buzzer Module Quickstart Guide.