Go to Post Ah AndyMark and your $2 a piece pool noodles - mlantry [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
  #10   Spotlight this post!  
Unread 15-10-2004, 23:56
wun's Avatar
wun wun is offline
Registered User
AKA: David Wolever
#0865 (Warp7)
Team Role: Programmer
 
Join Date: Dec 2003
Rookie Year: 2001
Location: Toronto
Posts: 84
wun will become famous soon enough
Send a message via AIM to wun Send a message via MSN to wun
Re: Create a low speed drive in programming

Quote:
Originally Posted by Bharat Nain
Our robots are a little too fast for anyone other than the driver to control. Since we take our robots out for demos and stuff, I being the programmer would want it to be safe. So I have been trying to come up with a program to drive this thing at half speed when the joystick are at full forward. We can't just divide all the values by 2 because that moves the center from 127 to 63.5. Anybody done such a thing, or can come up with a working program for this? I would appreciate any help
Thanks,
-Bharat
Another good way is look up tables. Then you can also set it up so it "ramps" (eg: if you move the joystick 1/2 of the way, it will only bring it up to 1/4 the possible speed, then when you push the joystick all the way, the robot will go up to 1/2 speed (or what have you). The code would look something like this:
Code:
const rom unsigned char mytable[256] = {
     56,56,55,55....
};
I wrote a little python script (which I promptly lost) that would generate them for me. There is also an auto-generator here (but your gonna need M$ excel to open it =\)
__________________
Help Microsoft stop piracy. Use Linux!

I have three gmail invitations, message me if you want one
 


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
what's your most important drive train advice? Ken Leung Technical Discussion 42 07-01-2003 09:58
Power, speed, and torque... AGH Gui Cavalcanti Technical Discussion 5 10-11-2002 19:02
Quad- 1/2 track drive system Ben Mitchell Technical Discussion 24 30-01-2002 11:55
"Motors and Drive train edition" of Fresh From the Forum Ken Leung CD Forum Support 6 29-01-2002 12:32
Drivetrain Help Jordan Technical Discussion 16 02-12-2001 12:14


All times are GMT -5. The time now is 20:38.

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