I just got two new sensors: a sound sensor and a knock sensor. In the attachment I've uploaded some photos of the setup (sorry for the quality). The problem I have is that the two sensors are only returning the value 1023 and don't react on differences in the input.
This is the code I use (just to check if everything is working allright):
@knut what do you mean with and interrupt pin, is that PWM?
I've tried to connect to digital PWM pin but then I only get '1' from both sensor, but I assume this is because a digital pin can only have two values right?
I've also tried to add the pinMode statement, but that doesn't make a difference.
Yes I did but that example is with a piezo. I've tried using a 1 meg-ohm resistor between the knock sensor and ground, but that doesn't make a difference.
It's quite frustrating. Does anyone can tell me what I'm completely missing here?