Hallo, I have made a simple setup with an Arduino UNO, where a Piezo sensor and a 1M resistance are in parallel and are connected to GND and A0.
Then I made this simple code to see the analog input:
int knockSensor = A0;
void setup() {
pinMode(13, OUTPUT);
Serial.begin(9600);
}
void loop() {
Serial.println(analogRead(knockSensor));
}
I thought that my output in the serial monitor would lay steady and jump then the piezo was tapped at. But instead it just looks like this:
0
0
0
0
70
84
0
0
0
8
91
69
0
0
0
26
102
0
0
0
2
80
78
0
0
0
16
106
And that is when you don't touch the piezo. The numbers jump then I tap the piezo directly, but not when I tap around it. I am quite new to this, so I hope someone could help me out
//Mobben