Rockbox Technical Forums

Support and General Use => User Interface and Voice => Topic started by: Angyman on June 10, 2007, 05:19:19 AM

Title: Help with code for the ADC of the H10
Post by: Angyman on June 10, 2007, 05:19:19 AM
Hi everybody... I already tried a while back to get the scrollpad of the H10 working with no approach but this time i used a different smoothing function which looks (to me) quite promising.

The main problem:
The Output of the ADC for the H10 scrollpad  is quite noisy so it needs to be smoothed out. I've got this so far done. But the real problem is the "ADC signal drop" if the user doesnt press the touchpad anymore. For example: If a user just "taps" once on the upper area my values raise and drop very fast from 0 to 5 to 0... The signal increase is not a big problem and can be resolved through a delay. SO here my main question: How would you ignore the signal decrease from 5 to 0??? I cannot take only the highest values because dragging from the upper to the lower fields must also be recognized. Any ideas?

I also tried to measure the time between the raise and the fall to detect a signal drop but i didnt get this working.

EDIT: Hmm, i suppose the only way is to implement something like a prediction filter. Smoothing the values seems to be one task and another would be to predict the final signal result through the comparison of the delta inbetween signal changes.