Skip to main content

Timeline for Digital Sound sensor

Current License: CC BY-SA 4.0

9 events
when toggle format what by license comment
Jul 17, 2018 at 18:14 comment added esoterik @jan I added debouncing to the code, and made it a little better; hope you understand how this works.
Jul 17, 2018 at 18:12 history edited esoterik CC BY-SA 4.0
expanded upon answer; refactored
Jul 17, 2018 at 18:05 history edited esoterik CC BY-SA 4.0
expanded upon answer.
Jul 17, 2018 at 8:00 comment added jan But the sound sensor still is a problem. Because it gives me a lot of HIGHs when I clap, not just one. Sometimes it gives: 0,0,1,0,1. The I have two HIGHs very fast with one clap
Jul 16, 2018 at 23:36 comment added esoterik @jan it just occured to me that time = pulseIn(pin, LOW); might do exactly what you want.
Jul 16, 2018 at 23:32 comment added esoterik @jan pulse in measures how long the pin is high for, you might be able to pulseIn(pin, HIGH); start = millis(); pulsein(pin, HIGH); end = millis(); if(end-start) ...
Jul 16, 2018 at 23:30 history edited esoterik CC BY-SA 4.0
expanded upon answer.
Jul 16, 2018 at 22:13 comment added jan So, should I do it with the pulseIn function? That way I can measure the time between HIGH and LOW. How do you recommend me doing it. I just started a week ago with Arduino, I am not very familiar with different coding techniques.
Jul 16, 2018 at 22:00 history answered esoterik CC BY-SA 4.0