Hello guys,
I'm working on a robot with my fellow students as some of you may have read (thread "the Robo-waitress" posted as "WB106"), and decided to buy an Arduino for myself as well to fool around.
As my first own project I'd like to do something with recognizing sounds, trying out things like controlling a light by clapping a few times or let it pulse on music and hopefully ending up with an audio visualizer that can detect tones as well. I thought I'll use this thread to post all my dumb questions so I won't have to litter other topics with them ![]()
So as I said this is my first real project, I did make some small things with running LED's, controlling servo's etc already but I'm pretty much a nitwit when it comes to electronics.
I just managed to get the piëzo knock sensor to work somewhat. I think the delay in the example file should be behind the if-statement instead of being in the loop separately to get it to work properly (otherwise it won't detect knocks shorter than 100ms, instead of pausing 100ms after a knock is detected), but I could be wrong.
Although hitting the piëzo works quite well, it looks like it won't be able to detect quiter sounds since it gets unpredictable when I lower the threshold.
Is this a matter of using a different resistor (I'm using 1MOhm now) or should I use another sensor (a microphone?) to make something out of this little project?
I would appreciate it if you have some tips where to start with, I'd like to start very simple and then expand it to something more complicated.