Multiple knock sensors

Hi everybody !

I want to use 3 (or more) knock sensors. So I had read knock tuto from arduino website and I had created this montage (attachment image).

But when all analogs in receive once knock. For example, if i knock on the top knock sensor, A3, A4 and A5 receive in same time the knock signal.

What am I doing to fix it ?

Thanks you very much and sorry about my approximate english language.


Try adding a short delay between analogRead()s of the three pins or perform two analogRead()s of each pin and discard the first result.


The Atmega datasheet also cautions against switching analog pins in close temporal proximity to making A/D readings (analogRead) on other analog pins. This can cause electrical noise and introduce jitter in the analog system. It may be desirable, after manipulating analog pins (in digital mode), to add a short delay before using analogRead() to read other analog pins.