Skip to content
Adaptive AgroTech NetworkUniversity of Southern Denmark · SDU Drone Center
Cover for Double-Knock Desk Light | Arduino Nano & Piezo Sensor

Video by Adaptive AgroTech. If the embedded player is unavailable, open the original video ↗.

Double-Knock Desk Light | Arduino Nano & Piezo Sensor

A piezo sensor turns knocks on a desk into transient electrical signals. The Arduino recognizes a double knock by timing distinct events.

Understand the concept

The key idea

A single impact can make the desk and sensor ring, producing multiple peaks. A short ignore interval after the first event and an upper limit on the second distinguish a two-knock gesture.

What to remember

  • Group nearby peaks from the same impact.
  • Tune the permitted interval using representative knocks on the actual desk.
Pause & think

Check your understanding

Why can a single knock switch the light in an overly sensitive design?

Show the explanation

Oscillation after the impact can cross the threshold again and be counted as a second knock.