Go to Post Has anybody seen our programmer? He was last sighted walking southbound in the rain, his laptop tucked under his arm, grumbling to himself. - Taylor [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
  #3   Spotlight this post!  
Unread 07-02-2009, 07:51
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,753
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: how to limit speed on the motors.

I'm not sure if the question was related to joystick axis input, but that is what I'll assume.

A useful function for doing what was shown in the previous post is the In Range and Coerce function. You wire your value into the middle, and you wire your max and min in as well. You can right click on it to set whether the endpoints are included. This will work to clip your inputs.

Perhaps a better approach for the joystick is to rescale the joystickinput to a different numerical range. To do this, instead of having the joystick go from -1 to 1, perhaps you divide by 2. Not everything on the joystick is less and the joystick's full limits are only half.

Another approach that may be worth trying if you like playing with the math is to use something nonlinear. Since the joystick is in the range of -1 to 1, by squaring it, you stay in that range, but change the shape to a parabola. This will give finer control near center, but full range near the edges. You can even go crazy with the yTox function to get other shapes.

Greg McKaskle
 


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
Code to have speed of motors dependent on how hard you push the joystick JoJo5 Programming 15 06-02-2007 12:35
How to speed up the dc motor via BS2? lgz108 Motors 8 14-11-2005 14:26
Limit of the atwood motors? Clanat Motors 6 16-03-2004 10:46
How do you set a speed limit on the servo Fares Programming 6 01-01-2003 15:04
Four motors at the same speed? archiver 2001 8 23-06-2002 22:51


All times are GMT -5. The time now is 21:47.

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