How to code of piezoelectric

Hello everyone.
How can I write a code that counts +1 when the input value changes (the input value is piezoelectric).
so when pressing on piezoelectric count +1 every single press and then when reach 10 (10 presses) turn on the led

Give us a Link to your sensor.

here you go

Hard to say how You can do it? Use the keyboard.
What piezo?
Read the first topics telling how to get the best from this forum.
We are happy to help You with code issues as well as electronics but helping You to write an understandable question... No, no.

What kind of reading do you get when it is tapped ?

the output of piezoelectric, whatever it's value....
as I'm telling the arduino if someone press on arduino count +1

Google "Arduino knock sensor".

most pieco-electric devices produce 1000 Volt or even more. So i highly doubt that a pieco-electric thing is a good inputdevice for a 5V-arduino

1" piezo disks don't generate enough current to damage the input clamping diodes.
Unless you hit the piezo with a hammer.

to answer on the same level of unspecificness:
program an if-condition that becomes true if the pieco-signal is above threshold-level and then increment variable by one (in your favorite style of how this can be coded)

Now this "advice" does not help at all. There is no way around learning the basics except posting in the gigs and collaboration-sub-forum paying somebody 50$ per

  • clearing functional details per hour
  • programming-hour

so IMHO the next step for you is to at least try to write two or three lines of code and then ask specific questions.

Or asking a question like what tutorial do you recommend to learn the basics?

best regards Stefan

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.