Go to Post You can never have enough teamwork. - Koko Ed [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Spotlight this post!  
Unread 24-01-2005, 22:01
jgannon's Avatar
jgannon jgannon is offline
I ᐸ3 Robots
AKA: Joey Gannon
no team
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Pittsburgh, PA
Posts: 1,467
jgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond repute
Re: Slowing Down Drive Motors

Instantiate two ints named temp15 and temp16. After the limit mixing functions have run, do this:
Code:
temp15=(int)pwm15-127;
temp16=(int)pwm16-127;
pwm15=(int)(.007874*pow(temp15,3)/fabs(temp15)+127);
pwm16=(int)(.007874*pow(temp16,3)/fabs(temp16)+127);
My real code is structured a little differently, but it works the same. 0 still outputs 0. 127 still outputs 127. 254 still outputs 254. Everything else in between is much less touchy, and it gives the driver a lot more control. It's also much simpler than making a lookup table, and won't eat up all your memory. (Yes, this is how I actually code. No, nobody else can ever figure out what I'm doing.)
__________________
Team 1743 - The Short Circuits
2010 Pittsburgh Excellence in Design & Team Spirit Awards
2009 Pittsburgh Regional Champions (thanks to 222 and 1218)
2007 Pittsburgh Website Award
2006 Pittsburgh Regional Champions (thanks to 395 and 1038)
2006 Pittsburgh Rookie Inspiration & Highest Rookie Seed

Team 1388 - Eagle Robotics
2005 Sacramento Engineering Inspiration
2004 Curie Division Champions (thanks to 1038 and 175)
2004 Sacramento Rookie All-Star

_
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
2 drive motors VS 4 drive motors Conor Ryan Motors 9 19-01-2005 22:35
What motors do you use to drive your robot? _GP_ General Forum 25 25-01-2004 21:14
How many motors are you using to drive? Joseph F Motors 18 16-10-2002 21:24
Looking for practice motors & extra tape drive parts? archiver 2000 1 23-06-2002 22:54
"Motors and Drive train edition" of Fresh From the Forum Ken Leung CD Forum Support 6 29-01-2002 12:32


All times are GMT -5. The time now is 09:52.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi