View Single Post
  #2   Spotlight this post!  
Unread 01-02-2004, 17:16
mtrawls's Avatar
mtrawls mtrawls is offline
I am JVN! (John von Neumann)
#0122 (NASA Knights)
Team Role: Programmer
 
Join Date: Mar 2003
Location: Hampton, VA
Posts: 295
mtrawls is a splendid one to beholdmtrawls is a splendid one to beholdmtrawls is a splendid one to beholdmtrawls is a splendid one to beholdmtrawls is a splendid one to beholdmtrawls is a splendid one to beholdmtrawls is a splendid one to behold
Send a message via AIM to mtrawls
Re: Encoder Counts/time period to PWM value

Quote:
Originally Posted by Zee
Hey guys, I have no clue how to do this. How do I convert the number of counts I receive from the encoder over a given time period to a corresponding PWM value?

Thanks
Well, what does the encoder count tell you? It can tell you how far you've gone. So, how do you convert that into a PWM value? Well, if you know that you want to go 3 feet, and your encoders tell you that you've only gone 2 feet, then you send your motors a value telling them to go forward. For a specific algorithm, I suggest using PID control. You can search these forums, or the internet in general for an explanation of this.