View Single Post
  #17   Spotlight this post!  
Unread 30-01-2012, 08:33
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,015
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: pic: Encoder Graph

Quote:
Originally Posted by John_1102 View Post
No not yet that seems to be the popular suggestion to fix this problem.
how would I go about sampling?
I know I would need to pull the raw value.
Do I store an initial value and then just add to it then divide it by my time?
  1. Get new_value (of counts)
  2. delta_counts = new_value - previous_value
  3. speed = delta_counts / cycle_time* (scaled to whatever units you want to use for speed*)
  4. previous_value = new_value


*See posts 23, 24, & 26 of this thread.


Last edited by Ether : 30-01-2012 at 08:43.
Reply With Quote