So what I’m trying to do is get a passive buzzer to sound once getting the signal from the knock sensor by knocking on the sensor. I don’t know what I’m doing wrong in the code e.t.c. Someone please help me!
Look at the error message in the bottom of your screen! Nothing will work until you get a clean Verify.
You need to define VARIABLES before you use them.
Also you are printing 'val' which is not defined anywhere.
Also delay(200); is 200 Milliseconds not 2
So I am using both the knock and passive buzzer sensor. My goal is to make the passive buzzer sound when I knock the knock sensor.. What are the key lines of code that I'll need???
My Code that I made does it manually without me knocking on it, it already starts to buzz so I want to know how to fix it....
You want to know how to fix some code but you're not going to post that code?
@II_ARDU1N0_II, please do not cross-post. Threads merged.
your code shows >= threshold try flipping the > sign to a < sign. and test the sensor again. that worked for me in the past.