Arduino Knock Lock not working properly


I recall having problems getting the Arduino Knock Lock to work properly. I’ve added my own modified code below – hopefully somebody finds it of use. The issue with the code seemed to be the speed at which the knock evaluations were taking place (meaning that one knock counted as more than one), and the sound sensitivity values in the code that caused the smallest sounds to be counted as knocks.

By modifying the delay() times and the quietKnock and loudKnock values, you should approach a more usable setup. The code could be improved further of course — but this will suffice.





One Comment

  1. Thank you so much for your code improvements. My project works now.

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">