Go to Post It is NOT possible to fail within FIRST. It IS possible to fail within the competition (whatever your criteria for failure may be). - JVN [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 01-02-2007, 15:10
joesmomh00haha's Avatar
joesmomh00haha joesmomh00haha is offline
sneeble
AKA: sneeble
FRC #1841 (Crazy Bred)
Team Role: Mascot
 
Join Date: Feb 2007
Rookie Year: 2007
Location: Florida
Posts: 40
joesmomh00haha is infamous around these parts
Exclamation button programming

How do you program the buttons on the 360 controller?
  #2   Spotlight this post!  
Unread 01-02-2007, 15:17
Alexa Stott's Avatar
Alexa Stott Alexa Stott is offline
All I do is twin.
AKA: elixir
FRC #0025 (Raider Robotix)
Team Role: College Student
 
Join Date: Oct 2005
Rookie Year: 2006
Location: No. Bruns., NJ/College Park, MD
Posts: 781
Alexa Stott has a reputation beyond reputeAlexa Stott has a reputation beyond reputeAlexa Stott has a reputation beyond reputeAlexa Stott has a reputation beyond reputeAlexa Stott has a reputation beyond reputeAlexa Stott has a reputation beyond reputeAlexa Stott has a reputation beyond reputeAlexa Stott has a reputation beyond reputeAlexa Stott has a reputation beyond reputeAlexa Stott has a reputation beyond reputeAlexa Stott has a reputation beyond repute
Send a message via AIM to Alexa Stott
Re: button programming

It should all be in the user manual.
__________________
|Email:alexastott[at]gmail.com|Facebook|@zelixir|Google+|
[University of Maryland Computer Science, Psychology]
[Brunswick Eruption]
  #3   Spotlight this post!  
Unread 01-02-2007, 15:30
joesmomh00haha's Avatar
joesmomh00haha joesmomh00haha is offline
sneeble
AKA: sneeble
FRC #1841 (Crazy Bred)
Team Role: Mascot
 
Join Date: Feb 2007
Rookie Year: 2007
Location: Florida
Posts: 40
joesmomh00haha is infamous around these parts
Exclamation Re: button programming

we have read it several times and we need to know how to program the controller to use the triggers, rb, lb,a,b,x,y,and the right joystick. We need them to operate some motors through the relay outputs. Our programmers are new to this and we can use the help.
  #4   Spotlight this post!  
Unread 01-02-2007, 15:38
Andrew Morris's Avatar
Andrew Morris Andrew Morris is offline
Oh hey, it's build season!
FRC #0177 (Bobcat Robotics)
Team Role: Student
 
Join Date: Nov 2006
Rookie Year: 2005
Location: South Windsor
Posts: 16
Andrew Morris will become famous soon enough
Re: button programming

On page 5 of the manual there are tables showing the type of input to the controller you will get in the different modes(eg. trig, top, aux1, wheel). These combined with whatever port you have the controller plugged into give you the names to use for reading them(eg. p1_sw_trig, p1_sw_aux1). Then you can use those to control the relay ports on the RC.

If you want to use all the buttons and the right stick but not the left stick you should use mode 4 on the USB chicklet
__________________
2010 Newton Division & Championship Winner w/ 67 & 294
2009 CMP Champion - Newton Division
2008 CMP Champion - Archimedes Division
2007 Newton Division & Championship Winner

Last edited by Andrew Morris : 01-02-2007 at 15:44.
  #5   Spotlight this post!  
Unread 01-02-2007, 15:48
Hieb Hieb is offline
Registered User
no team
Team Role: Teacher
 
Join Date: Mar 2004
Rookie Year: 2004
Location: St. Louis, MO
Posts: 125
Hieb is a splendid one to beholdHieb is a splendid one to beholdHieb is a splendid one to beholdHieb is a splendid one to beholdHieb is a splendid one to beholdHieb is a splendid one to beholdHieb is a splendid one to behold
Re: button programming

First you'll need to figure out which ports the buttons map to. I don't have time for much detail, but I'd probably just write in a quick debug routine with printfs to show in the terminal window which button was being pushed (ex. p1_trig, p1_aux1, etc).
  #6   Spotlight this post!  
Unread 01-02-2007, 15:53
joesmomh00haha's Avatar
joesmomh00haha joesmomh00haha is offline
sneeble
AKA: sneeble
FRC #1841 (Crazy Bred)
Team Role: Mascot
 
Join Date: Feb 2007
Rookie Year: 2007
Location: Florida
Posts: 40
joesmomh00haha is infamous around these parts
Re: button programming

the mode is good, we are using mode 3 using the left joystick to control the whole robot(which is what we want). the problem we are having is how to program the xbox360 controller to use motors in the robot(our arm consists of at least 8 different motors for different parts of the arm, and we want to know how we would program the controller to use those motors, we already have 4 buttons programmed(a and b are relay 1, x and y are relay 5) to move or turn on the motors but we don't know how to program the rest of the other robots.)
__________________
  #7   Spotlight this post!  
Unread 01-02-2007, 16:35
AdamHeard's Avatar
AdamHeard AdamHeard is offline
Lead Mentor
FRC #0973 (Greybots)
Team Role: Mentor
 
Join Date: Oct 2004
Rookie Year: 2004
Location: Atascadero
Posts: 5,508
AdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond repute
Send a message via AIM to AdamHeard
Re: button programming

8 different motors for the arm?

You're probably going to need some feedback on there to make that work.


For the Controller, the chiclet manual tells you what it outputs as. Then in your code you have to change a motor based on that.

The simplist version is proportional drive; but that would be rather inneffective for an arm.

This is an example of the motor from port one being powered by a joystick.
Quote:
pwm01 = p1_x;
  #8   Spotlight this post!  
Unread 02-02-2007, 08:02
joesmomh00haha's Avatar
joesmomh00haha joesmomh00haha is offline
sneeble
AKA: sneeble
FRC #1841 (Crazy Bred)
Team Role: Mascot
 
Join Date: Feb 2007
Rookie Year: 2007
Location: Florida
Posts: 40
joesmomh00haha is infamous around these parts
Re: button programming

we need to program the buttons to control the motors. we are ok with the joysticks. the motors need to program through the relay outputs.
__________________
  #9   Spotlight this post!  
Unread 07-02-2007, 08:20
joesmomh00haha's Avatar
joesmomh00haha joesmomh00haha is offline
sneeble
AKA: sneeble
FRC #1841 (Crazy Bred)
Team Role: Mascot
 
Join Date: Feb 2007
Rookie Year: 2007
Location: Florida
Posts: 40
joesmomh00haha is infamous around these parts
Exclamation Re: button programming

to those who told us to read the manual.
Thank you very much, we have not thought of that.
It is not that we need 8 motors.
we only need 4 but they have to go both ways.


:Also: to add more inputs we tried using "wheel" but it keeps going until we press the "wheel" then it will go the right direction until we let go.
__________________
  #10   Spotlight this post!  
Unread 07-02-2007, 19:22
Tureyhall Tureyhall is offline
Registered User
AKA: Thomas Hall
FRC #0668 (Apes Of Wrath)
Team Role: Programmer
 
Join Date: Feb 2006
Rookie Year: 2004
Location: San Jose
Posts: 40
Tureyhall will become famous soon enoughTureyhall will become famous soon enough
Re: button programming

Quote:
Originally Posted by joesmomh00haha View Post
:Also: to add more inputs we tried using "wheel" but it keeps going until we press the "wheel" then it will go the right direction until we let go.

wheel is analog. You'll have to do something like:
#define p1_sw_wheel ((p1_wheel > 127) ? 1 : 0)

This means that if p1_wheel is greater that 127 (which I'm assuming is when the button is pressed. If not, change it to < ) it'll evaluate to 1, and if it's less than 127 (which I'm assuming is not pressed) it'll evaluate to 0.
__________________
/*Nerd Camouflage*/

2005 SVR - 668+1072+840 - Semifinalists.
2006 SVR - 668+1280+1693 - Finalists.
2007 SVR - 668+604+624 - Quarter-finalists, Xerox Creativity Award, two highest scores (290-2, 128-0) at SVR.
2007 Nat's - TBA.
  #11   Spotlight this post!  
Unread 08-02-2007, 08:24
joesmomh00haha's Avatar
joesmomh00haha joesmomh00haha is offline
sneeble
AKA: sneeble
FRC #1841 (Crazy Bred)
Team Role: Mascot
 
Join Date: Feb 2007
Rookie Year: 2007
Location: Florida
Posts: 40
joesmomh00haha is infamous around these parts
Talking Re: button programming

good lookin out. that code is workin so thanks alot.
__________________
  #12   Spotlight this post!  
Unread 09-02-2007, 08:21
joesmomh00haha's Avatar
joesmomh00haha joesmomh00haha is offline
sneeble
AKA: sneeble
FRC #1841 (Crazy Bred)
Team Role: Mascot
 
Join Date: Feb 2007
Rookie Year: 2007
Location: Florida
Posts: 40
joesmomh00haha is infamous around these parts
Question Re: button programming

new obstacle..
is there a way to make the wheel go as a sw on both the x and y
__________________
  #13   Spotlight this post!  
Unread 10-02-2007, 10:36
joesmomh00haha's Avatar
joesmomh00haha joesmomh00haha is offline
sneeble
AKA: sneeble
FRC #1841 (Crazy Bred)
Team Role: Mascot
 
Join Date: Feb 2007
Rookie Year: 2007
Location: Florida
Posts: 40
joesmomh00haha is infamous around these parts
Lightbulb Re: button programming

this is a reply to move us to top.
__________________
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
programming motors with programming kit BorisTheBlade FIRST Tech Challenge 4 01-11-2005 19:03
Button making Alex Burman Team Organization 7 10-10-2005 21:45
Joystick Button programming Bharat Nain Programming 5 18-02-2005 11:48
Arm Rotation (1 Button Programming!!) Joelster Technical Discussion 1 14-02-2002 13:15
Button Bar Adrian Wong CD Forum Support 8 04-06-2001 20:27


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

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