Hi,
I have a problem with my circuit.
There are 6 piezos connected to an arduino Uno.
I send a message with Serial.printl() every time a piezo is knocked.
After a minute or two, several messages are being sent for only one knock.
What is the problem ?
Thank you in advance for your answer.
Something else I noticed - you should use 'unsigned long' for storing 'millis()' values, not 'unsigned int'.
Change this:-unsigned int lastTime[] = {0, 0, 0, 0, 0, 0};to this:-unsigned long lastTime[] = {0, 0, 0, 0, 0, 0};