View Single Post
  #9   Spotlight this post!  
Unread 15-10-2004, 22:31
Max Lobovsky's Avatar
Max Lobovsky Max Lobovsky is offline
Fold em oval!
FRC #1257 (Parallel Universe)
Team Role: College Student
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Scotch Plains, NJ
Posts: 1,026
Max Lobovsky has a brilliant futureMax Lobovsky has a brilliant futureMax Lobovsky has a brilliant futureMax Lobovsky has a brilliant futureMax Lobovsky has a brilliant futureMax Lobovsky has a brilliant futureMax Lobovsky has a brilliant futureMax Lobovsky has a brilliant futureMax Lobovsky has a brilliant futureMax Lobovsky has a brilliant futureMax Lobovsky has a brilliant future
Send a message via AIM to Max Lobovsky
Re: Create a low speed drive in programming

Two simple ways that I can think of off the top of my head:

1. convert the speeds to signed values then divide by two:
Code:
int signValue(int value)				
   {
   	return value - 127;
   }
divide by two then:

Code:
int unsignValue(int value)
   {
   	return value + 127;
   }
2. This one allows for some interesting possibilities. An open-filter system.
Code:
char filter[255] = [64,64,65,65,etc,etc];
   motorOutput = filter[joystickInput];
You can simply fill the filter array with [64,196] (middle 50% of speed range) in with a constant slope, or you can experiment with having a curve to, for example, put values near the center closer together to give even greater very low speed control. In fact, you may decided to leave the full range of possible speeds, just make it so the joystick has to be at the far extremes to reach full speed.
__________________
Learn, edit, inspire: The FIRSTwiki.
Team 1257


2005 NYC Regional - 2nd seed, Xerox Creativity Award, Autodesk Visualization Award
2005 Chesapeake Regional - Engineering Inspiration Award
2004 Chesapeake Regional - Rookie Inspiration award
2004 NJ Regional - Team Spirit Award

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