Go to Post Through 30 years of teaching I've heard the same refrain..."I love science, I love math but I can't stand my language classes". Well enough is enough. Get over it. - Mr.B [more]
Home
Go Back   Chief Delphi > FIRST > General Forum
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 09-03-2014, 12:06
18mfogwell's Avatar
18mfogwell 18mfogwell is offline
Registered User
AKA: Michelle Fogwell
FRC #4460 (Green MASHine)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Pennsylvania
Posts: 42
18mfogwell is an unknown quantity at this point
Netbeans programming ONE motor on axis of Logitech Attack 3

Hi All!

Our team only knows how to program the axis on the Logitech Attack 3 if we are working with 2 motors. How would we change the program if we were to only program one motor?

Thanks in advance!
Green MASHine 4460
Reply With Quote
  #2   Spotlight this post!  
Unread 09-03-2014, 12:22
Whippet's Avatar
Whippet Whippet is offline
MIT Class of 2020
AKA: Luis Trueba
FRC #4301 (New Tech Narcissists)
Team Role: Alumni
 
Join Date: Feb 2011
Rookie Year: 2011
Location: Cambridge, MA
Posts: 1,187
Whippet has a reputation beyond reputeWhippet has a reputation beyond reputeWhippet has a reputation beyond reputeWhippet has a reputation beyond reputeWhippet has a reputation beyond reputeWhippet has a reputation beyond reputeWhippet has a reputation beyond reputeWhippet has a reputation beyond reputeWhippet has a reputation beyond reputeWhippet has a reputation beyond reputeWhippet has a reputation beyond repute
Send a message via Yahoo to Whippet
Re: Netbeans programming ONE motor on axis of Logitech Attack 3

Motor.setSpeed(joystick.GetRawAxis(1));

Where 1 can be replaced with your joystick axis, joystick can be replaced with your joystick name, and motor with the name of your PWM output.
__________________
2010: FRC 3043, Build Assistant
2011: FRC 3043, Head of Minibot subteam; FLL 12762, Team Captain
2012: FRC 3043, Electrical; FLL 12762, Team Captain; FTC 5670, Team Captain
2013: FRC 4301, Electrical, Team Co-Captain
2014: FRC 4301, Electrical/Programming, Team Co-Captain
2015: FRC 4301, Electrical/Programming, Team Captain
2016: FRC 4301, Chief Technical Officer; FTC 10860, 10861, and 11004: Mentor. Winner, Hub City Regional (3310 & 4063)
Reply With Quote
  #3   Spotlight this post!  
Unread 09-03-2014, 12:26
18mfogwell's Avatar
18mfogwell 18mfogwell is offline
Registered User
AKA: Michelle Fogwell
FRC #4460 (Green MASHine)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Pennsylvania
Posts: 42
18mfogwell is an unknown quantity at this point
Re: Netbeans programming ONE motor on axis of Logitech Attack 3

Quote:
Originally Posted by Whippet View Post
Motor.setSpeed(joystick.GetRawAxis(1));

Where 1 can be replaced with your joystick axis, joystick can be replaced with your joystick name, and motor with the name of your PWM output.
Okay, thanks! I will try it!
Reply With Quote
  #4   Spotlight this post!  
Unread 09-03-2014, 12:30
18mfogwell's Avatar
18mfogwell 18mfogwell is offline
Registered User
AKA: Michelle Fogwell
FRC #4460 (Green MASHine)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Pennsylvania
Posts: 42
18mfogwell is an unknown quantity at this point
Re: Netbeans programming ONE motor on axis of Logitech Attack 3

Quote:
Originally Posted by Whippet View Post
Motor.setSpeed(joystick.GetRawAxis(1));

Where 1 can be replaced with your joystick axis, joystick can be replaced with your joystick name, and motor with the name of your PWM output.
So I have

Pulley.setSpeed(operator.getRawAxis(2));

It is coming up as a wrong command saying:

setSpeed(double) is not public in PWM; cannot be accessed from outside package

How do I fix this?

Thanks
Reply With Quote
  #5   Spotlight this post!  
Unread 09-03-2014, 12:47
Whippet's Avatar
Whippet Whippet is offline
MIT Class of 2020
AKA: Luis Trueba
FRC #4301 (New Tech Narcissists)
Team Role: Alumni
 
Join Date: Feb 2011
Rookie Year: 2011
Location: Cambridge, MA
Posts: 1,187
Whippet has a reputation beyond reputeWhippet has a reputation beyond reputeWhippet has a reputation beyond reputeWhippet has a reputation beyond reputeWhippet has a reputation beyond reputeWhippet has a reputation beyond reputeWhippet has a reputation beyond reputeWhippet has a reputation beyond reputeWhippet has a reputation beyond reputeWhippet has a reputation beyond reputeWhippet has a reputation beyond repute
Send a message via Yahoo to Whippet
Re: Netbeans programming ONE motor on axis of Logitech Attack 3

Whoops, my bad. It's "set" instead of "setSpeed." Try it like that.

EDIT: also, make sure that your pulley is designated as a jaguar, victor, or talon.
__________________
2010: FRC 3043, Build Assistant
2011: FRC 3043, Head of Minibot subteam; FLL 12762, Team Captain
2012: FRC 3043, Electrical; FLL 12762, Team Captain; FTC 5670, Team Captain
2013: FRC 4301, Electrical, Team Co-Captain
2014: FRC 4301, Electrical/Programming, Team Co-Captain
2015: FRC 4301, Electrical/Programming, Team Captain
2016: FRC 4301, Chief Technical Officer; FTC 10860, 10861, and 11004: Mentor. Winner, Hub City Regional (3310 & 4063)
Reply With Quote
  #6   Spotlight this post!  
Unread 09-03-2014, 12:49
18mfogwell's Avatar
18mfogwell 18mfogwell is offline
Registered User
AKA: Michelle Fogwell
FRC #4460 (Green MASHine)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Pennsylvania
Posts: 42
18mfogwell is an unknown quantity at this point
Re: Netbeans programming ONE motor on axis of Logitech Attack 3

Quote:
Originally Posted by Whippet View Post
Whoops, my bad. It's "set" instead of setSpeed. Try it like that.
Okay. That works.

Why would the axis numbers vary? I know because of the x and y axis but would the number for the y axis vary?

Thank you
Reply With Quote
  #7   Spotlight this post!  
Unread 09-03-2014, 12:54
Whippet's Avatar
Whippet Whippet is offline
MIT Class of 2020
AKA: Luis Trueba
FRC #4301 (New Tech Narcissists)
Team Role: Alumni
 
Join Date: Feb 2011
Rookie Year: 2011
Location: Cambridge, MA
Posts: 1,187
Whippet has a reputation beyond reputeWhippet has a reputation beyond reputeWhippet has a reputation beyond reputeWhippet has a reputation beyond reputeWhippet has a reputation beyond reputeWhippet has a reputation beyond reputeWhippet has a reputation beyond reputeWhippet has a reputation beyond reputeWhippet has a reputation beyond reputeWhippet has a reputation beyond reputeWhippet has a reputation beyond repute
Send a message via Yahoo to Whippet
Re: Netbeans programming ONE motor on axis of Logitech Attack 3

Quote:
Originally Posted by 18mfogwell View Post
Why would the axis numbers vary? I know because of the x and y axis but would the number for the y axis vary?

Thank you
I'm not quite sure what you mean. Could you please elaborate?
__________________
2010: FRC 3043, Build Assistant
2011: FRC 3043, Head of Minibot subteam; FLL 12762, Team Captain
2012: FRC 3043, Electrical; FLL 12762, Team Captain; FTC 5670, Team Captain
2013: FRC 4301, Electrical, Team Co-Captain
2014: FRC 4301, Electrical/Programming, Team Co-Captain
2015: FRC 4301, Electrical/Programming, Team Captain
2016: FRC 4301, Chief Technical Officer; FTC 10860, 10861, and 11004: Mentor. Winner, Hub City Regional (3310 & 4063)
Reply With Quote
  #8   Spotlight this post!  
Unread 09-03-2014, 12:57
18mfogwell's Avatar
18mfogwell 18mfogwell is offline
Registered User
AKA: Michelle Fogwell
FRC #4460 (Green MASHine)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Pennsylvania
Posts: 42
18mfogwell is an unknown quantity at this point
Re: Netbeans programming ONE motor on axis of Logitech Attack 3

Quote:
Originally Posted by Whippet View Post
I'm not quite sure what you mean; could you please elaborate?
What would the number be for the y-axis? Does the number vary?
Reply With Quote
  #9   Spotlight this post!  
Unread 09-03-2014, 13:16
Whippet's Avatar
Whippet Whippet is offline
MIT Class of 2020
AKA: Luis Trueba
FRC #4301 (New Tech Narcissists)
Team Role: Alumni
 
Join Date: Feb 2011
Rookie Year: 2011
Location: Cambridge, MA
Posts: 1,187
Whippet has a reputation beyond reputeWhippet has a reputation beyond reputeWhippet has a reputation beyond reputeWhippet has a reputation beyond reputeWhippet has a reputation beyond reputeWhippet has a reputation beyond reputeWhippet has a reputation beyond reputeWhippet has a reputation beyond reputeWhippet has a reputation beyond reputeWhippet has a reputation beyond reputeWhippet has a reputation beyond repute
Send a message via Yahoo to Whippet
Re: Netbeans programming ONE motor on axis of Logitech Attack 3

Ah, ok. Every joystick axis has a number attached attached to it. The joystick.Get command basically checks a database for which axis number matches x, y, z, or the other axis names. I prefer to use getRawAxis because I know exactly the axis number I am calling for. It's really a matter of preference. If you prefer, you can use joystick.getAxis(y) to return the same value.
__________________
2010: FRC 3043, Build Assistant
2011: FRC 3043, Head of Minibot subteam; FLL 12762, Team Captain
2012: FRC 3043, Electrical; FLL 12762, Team Captain; FTC 5670, Team Captain
2013: FRC 4301, Electrical, Team Co-Captain
2014: FRC 4301, Electrical/Programming, Team Co-Captain
2015: FRC 4301, Electrical/Programming, Team Captain
2016: FRC 4301, Chief Technical Officer; FTC 10860, 10861, and 11004: Mentor. Winner, Hub City Regional (3310 & 4063)
Reply With Quote
  #10   Spotlight this post!  
Unread 16-03-2014, 11:12
18mfogwell's Avatar
18mfogwell 18mfogwell is offline
Registered User
AKA: Michelle Fogwell
FRC #4460 (Green MASHine)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Pennsylvania
Posts: 42
18mfogwell is an unknown quantity at this point
Re: Netbeans programming ONE motor on axis of Logitech Attack 3

Quote:
Originally Posted by Whippet View Post
Ah, ok. Every joystick axis has a number attached attached to it. The joystick.Get command basically checks a database for which axis number matches x, y, z, or the other axis names. I prefer to use getRawAxis because I know exactly the axis number I am calling for. It's really a matter of preference. If you prefer, you can use joystick.getAxis(y) to return the same value.
Is there one numbers that is always associated with x or y?
Reply With Quote
  #11   Spotlight this post!  
Unread 16-03-2014, 11:22
Whippet's Avatar
Whippet Whippet is offline
MIT Class of 2020
AKA: Luis Trueba
FRC #4301 (New Tech Narcissists)
Team Role: Alumni
 
Join Date: Feb 2011
Rookie Year: 2011
Location: Cambridge, MA
Posts: 1,187
Whippet has a reputation beyond reputeWhippet has a reputation beyond reputeWhippet has a reputation beyond reputeWhippet has a reputation beyond reputeWhippet has a reputation beyond reputeWhippet has a reputation beyond reputeWhippet has a reputation beyond reputeWhippet has a reputation beyond reputeWhippet has a reputation beyond reputeWhippet has a reputation beyond reputeWhippet has a reputation beyond repute
Send a message via Yahoo to Whippet
Re: Netbeans programming ONE motor on axis of Logitech Attack 3

Quote:
Originally Posted by 18mfogwell View Post
Is there one numbers that is always associated with x or y?
The x axis is usually 1, and the y axis is usually 2. Axis 3 is usually the throttle, unless there's a twist axis, like in the Extreme 3D Pro joystick.
__________________
2010: FRC 3043, Build Assistant
2011: FRC 3043, Head of Minibot subteam; FLL 12762, Team Captain
2012: FRC 3043, Electrical; FLL 12762, Team Captain; FTC 5670, Team Captain
2013: FRC 4301, Electrical, Team Co-Captain
2014: FRC 4301, Electrical/Programming, Team Co-Captain
2015: FRC 4301, Electrical/Programming, Team Captain
2016: FRC 4301, Chief Technical Officer; FTC 10860, 10861, and 11004: Mentor. Winner, Hub City Regional (3310 & 4063)
Reply With Quote
Reply


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 21:30.

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