View Single Post
  #2   Spotlight this post!  
Unread 15-10-2004, 22:26
George1902's Avatar
George1902 George1902 is offline
It's a SPAM thing...
AKA: George1083; George180
FRC #0180 (SPAM)
Team Role: Mentor
 
Join Date: Dec 2001
Rookie Year: 1998
Location: Stuart, FL
Posts: 785
George1902 has a reputation beyond reputeGeorge1902 has a reputation beyond reputeGeorge1902 has a reputation beyond reputeGeorge1902 has a reputation beyond reputeGeorge1902 has a reputation beyond reputeGeorge1902 has a reputation beyond reputeGeorge1902 has a reputation beyond reputeGeorge1902 has a reputation beyond reputeGeorge1902 has a reputation beyond reputeGeorge1902 has a reputation beyond reputeGeorge1902 has a reputation beyond repute
Re: Create a low speed drive in programming

Quote:
Originally Posted by Bharat Nain
We can't just divide all the values by 2 because that moves the center from 127 to 63.5.
You can divide by 2 then add 63.5.

[edit]

You might want to tweak that reduction ratio a little, though. For example, you might want to multiply by 2/3 or 3/4 instead of 1/2. Whatever you decide to do, you can recenter your range by adding whatever it takes to get your center back to 127.

So a formula would be:

x1*reduction_ratio + (127-127*reduction_ratio)

And the same for y1
__________________
George

"Darkness cannot drive out darkness; only light can do that. Hate cannot drive out hate; only love can do that."
-- Martin Luther King, Jr.

Last edited by George1902 : 15-10-2004 at 22:34.