Go to Post When you come down to it, FIRST is about people inspiring other people; STEM and the robots are just the subject matter. - RyanCahoon [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

 
Closed Thread
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 13-02-2016, 09:42
Kevin Pai's Avatar
Kevin Pai Kevin Pai is offline
Registered User
FRC #5964 (Praetorians)
Team Role: Programmer
 
Join Date: Feb 2016
Rookie Year: 2015
Location: Voorheesville
Posts: 11
Kevin Pai is an unknown quantity at this point
How to SetThrottle

We are using java to program our robot and we are trying to change the sensitivity of our motor controller. Is there a way to SetThrottle, and will that help to change the sensitivity? We see that there is a method called GetThrottle. If not, we are also looking at Setoutput, which seems to use binary.
  #2   Spotlight this post!  
Unread 13-02-2016, 10:13
Jalerre's Avatar
Jalerre Jalerre is offline
Registered User
FRC #4965 (FIRE)
Team Role: Alumni
 
Join Date: Apr 2014
Rookie Year: 2013
Location: Anderson, SC
Posts: 147
Jalerre is on a distinguished road
Re: How to SetThrottle

If I understand this correctly, you are trying to use the throttle on your joystick to control the speed of your motor. To do this you need to create a method to change value of the throttle from -1-1 to 0-1 using some simple math. Specifically you'd need to add one to the output of the throttle then divide by two. You then multiply this new value by the number you input as the speed for the motor controller. If you are using a joystick to control the motor, this will limit the speed of your motor but still give you the full range of the joystick. If you need some example code, I can provide it.
__________________
Vex
2013: 415 - Fabrication, Programming, Electrical
2014: 415D - Captain, Programming Lead
FTC
2014: 7354 - Programming Lead
FRC
2013: 415 - Safety Animation, Fabrication
2014-2015: 4965 - Programming & Electrical
2016: 4965 - Captain, Programming Lead, Electrical
Closed Thread


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 00:42.

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