Hallo All,
Thanks for your suggestions and feedback.
This is the sensor I want to use:
The datasheet:
I don't really understand the hardware you have. Am I correct to think that you have some devices whose resistance changes when they are pressed and by using analogRead() you can tell whether each of them is pressed or released - presumably when the ADC reading exceeds some threshold value?
Does the analog reading (or resistance) depend on how hard you press it?
Yes that is correct.
If so, it seems to me that some push-button switches might be more suitable.
I need the pressure sensor since I only want a signal if they go over a threshold value.
Either way, if you want to know the rate at which they are being pressed and released you could record the value of millis() every time the state changes from not-pressed to pressed. And the time interval between presses will tell you how quickly they are pressed.
You could count the time between "button" presses and invert to get the frequency. Then you could sum or average those frequencies.
I will try that. Thank you.
I don't understand what that means.
It is supposed to look like a wider arcade game. Two teams with two or three people. Each team presses three sensors on the panel infornt of them. The frequency of this "presses" is convertet to the speed of a Race car on a stage hebinde the panel. The team that finishes first wins. It is supposed to teach team spirit and working together.
I hope this clarifies.
If it's digital you can make something that counts so the count "jumps-up", by let's say 10-counts, every time you push the button, and if you hold or release the button, it starts counting-down. The more and the faster you push the button the higher the count goes and if you stop it counts down. But, you'll quickly reach the maximum count and that's not very "interesting".
I tried something like that. It did not have good acceleration/deceleration nor was very smoothe.
You probably want some averaging or acceleration so the speed doesn't change instantly.
Yes that is what I am looking for.
do not see it as PWM. it is too slow. simply count the button presses.
I do not understand. Could you elaborate?
fair would be to read every button on different pin
I was plannig to do that.
Thank you all for the pointers.