I'm want to find out he speed and direction a person is turning a simple knob / potentiometer. My knob have the read value from 0 - 1025... So with the user spins the knob, I need to detect the rate at which he is spinning and also the direction... Is there a builtin math function I could use?
Example code would be amazing!!!
thanks for the help!
dan.
Speed is the rate of change of something over time. So you need to measure 2 things - the change in voltage measured thru the pot (the only measurement you talk about) and the time between readings.
Look at the blink without delay example to give you a way to working out how to do timing of things without using delay. For each time interval you measure the analog reading and then work out something meaningful for speed.