I have a project where one touches very different materials, all linked to the computer through audio cables. This way i can trigger sounds with the value changing(up) when there's a contact. The difference in the two values i obtain is quite small.
The thing is, the (no contact) values are always changing, so my threshold should be changing as well. For example, at the beginning my value would be 0.000234, but 10 minutes after it can be 0.000629.
I tried different ways for my threshold to change also, like putting a very short pipe and adding a small value to the original one, but it is not fine.
Would someone have an idea of a way to "real-time" change this threshold ?
Hope this question isn't too vague ...