Go to Post YES! I am a MENTOR. Not a chaperone. I am busy all day, I don't want to deal with the stupidity that may or may not go on at night. Besides, I might see something as a cool physics experiment, where a chaperone might see someone dropping pop cans down the stair wells. - Not2B [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 Rating: Thread Rating: 3 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #4   Spotlight this post!  
Unread 05-03-2015, 21:46
nighterfighter nighterfighter is offline
1771 Alum, 1771 Mentor
AKA: Matt B
FRC #1771 (1771)
Team Role: Mentor
 
Join Date: Sep 2009
Rookie Year: 2007
Location: Suwanee/Kennesaw, GA
Posts: 835
nighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant future
Re: Limit speed of 4 chassis CIM motors

You have a few ways to do this:

One way would to just multiply your inputs from the joystick by a constant, less than 1, and pass that value to your motor.Set() function.

Another way, would be to limit the actual speed of your robot. For this to work, you would need encoders on each side of the robot, to monitor your speed.

Then you have an if statement, comparing the current speed of your robot, to a predefined "maximum" speed. If you are approaching your maximum speed, lower the output of the motors by a certain amount.

I would suggest, for either solution, you have a toggle to turn it on and off. Maybe you will want to go full speed for some reason? Who knows.
__________________
1771- Programmer, Captain, Drive Team (2009-2012)
4509- Mentor (2013-2015)
1771- Mentor (2015)
 


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


All times are GMT -5. The time now is 08:27.

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