{"id":6,"date":"2011-01-25T22:15:57","date_gmt":"2011-01-25T22:15:57","guid":{"rendered":"https:\/\/gamadiyo.com\/blog\/?p=6"},"modified":"2011-01-25T22:15:57","modified_gmt":"2011-01-25T22:15:57","slug":"arduino-clap-count","status":"publish","type":"post","link":"https:\/\/gamadiyo.com\/blog\/?p=6","title":{"rendered":"Arduino: Clap count"},"content":{"rendered":"<p>Started with a small project. I had a small audio relay that I purchased as a hobby project a few year back called<a title=\"Mini Vox &amp; Relay\" href=\"http:\/\/www.electronics123.com\/s.nl\/it.A\/id.361\/.f\" target=\"_blank\"> Mini Vox &amp; Relay<\/a>. This kit lets you activate a relay when it hears a noise. I lost the microphone that it came with, but fortunately I found one in my box of &#8220;things&#8221; that worked. I was able to connect the relay to the 5V of the Arduino and the output to Pin 11. The modified the Blink code example and made it count 3 sounds\/claps. After 3 counts an LED would turn on.<\/p>\n<p>The problem I ran into was the relay stayed connected as long as the sound. While the relay was connected, the counter kept counting. I had to put a delay after the count so the relay had some time to disconnect to get around this problem. Another way to fix this issue would be to look for a low signal after a high to complete a full count. \u00c2\u00a0Personal note: Pull Up\/Down resistor!<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone\" title=\"Vox Relay\" src=\"http:\/\/www.electronics123.net\/amazon\/pictures\/cps126.jpg\" alt=\"\" width=\"288\" height=\"330\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Started with a small project. I had a small audio relay that I purchased as a hobby project a few year back called Mini Vox &amp; Relay. This kit lets you activate a relay when it hears a noise. I lost the microphone that it came with, but fortunately I found one in my box [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[9,15,14,16,13],"class_list":["post-6","post","type-post","status-publish","format-standard","hentry","category-arduino-2","tag-arduino","tag-microphone","tag-relay","tag-resistor","tag-vox"],"_links":{"self":[{"href":"https:\/\/gamadiyo.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/6","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gamadiyo.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gamadiyo.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gamadiyo.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gamadiyo.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6"}],"version-history":[{"count":0,"href":"https:\/\/gamadiyo.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/6\/revisions"}],"wp:attachment":[{"href":"https:\/\/gamadiyo.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gamadiyo.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gamadiyo.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}