Go to Post Do you have to think about FIRST when you get up in the morning? - KenWittlief [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 14-02-2007, 07:51
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 more buttons

we are using the 360 and we have 6 SWs that work. we want to get 10. so is there a way to write it so that we can activate the other switches.

p.s. happy valentines day
__________________
  #2   Spotlight this post!  
Unread 14-02-2007, 08:57
kaszeta's Avatar
kaszeta kaszeta is offline
Registered User
FRC #0095 (Grasshoppers)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2002
Location: Lebanon, NH
Posts: 334
kaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of light
Re: more buttons

Quote:
Originally Posted by joesmomh00haha View Post
we are using the 360 and we have 6 SWs that work. we want to get 10. so is there a way to write it so that we can activate the other switches.

p.s. happy valentines day
What mode is it configured for? If you have 6 Switches working, then the configuration routine should allow you to enable 12 switches.
  #3   Spotlight this post!  
Unread 15-02-2007, 15:07
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
Post Re: more buttons

we are currently running with mode 4.
Below i would explain our current situation, we have already been struggling with this problem since the beginning of the competition and we really need some help......

Yes... it is supposed to have 12 switches, but we only have 6 working which are the only ones that are in the code, we have the A B X Y buttons working(which in the code is written as the aux 1-4) and the wheel or the right analog in the xbox controller to just go back and forth(this is written in the code as the p1_wheel [ we get it to work, but we want it to work both ways, meaning the X and Y being two different motors, right now if we move it up/down left/right it goes either up or down for one single motor, we want it to go up/down a motor and left/right another motor.]<-thats another problem we have).

what we are really trying to do is to get enough numbers of buttons to work with certain motors, like i already said, we already have the simple default buttons working but we need some extra ones any way we could. we are guessing that we have to somehow define the extra buttons in the aliases, but we don't know how, right now, there is only the 4 buttons that is in the default, and the wheel which we added.

thanks for all of you people who are trying to help us out.
__________________
  #4   Spotlight this post!  
Unread 15-02-2007, 16:41
kaszeta's Avatar
kaszeta kaszeta is offline
Registered User
FRC #0095 (Grasshoppers)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2002
Location: Lebanon, NH
Posts: 334
kaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of light
Re: more buttons

Quote:
Originally Posted by joesmomh00haha View Post
Yes... it is supposed to have 12 switches, but we only have 6 working which are the only ones that are in the code, we have the A B X Y buttons working(which in the code is written as the aux 1-4) and the wheel or the right analog in the xbox controller to just go back and forth(this is written in the code as the p1_wheel [ we get it to work, but we want it to work both ways, meaning the X and Y being two different motors, right now if we move it up/down left/right it goes either up or down for one single motor, we want it to go up/down a motor and left/right another motor.]<-thats another problem we have).
I'm confused here. You're using Mode 4 for an Xbox 360 controller. If so, this makes a total of 2 axes and 12 buttons available. The two axis for mode 4 are the right joystick, and the 12 buttons are whatever buttons you've selected as per the configuration instructions for the chicklet.

Assuming your on port one, the right joystick's axes are the variable p1_x and p1_y. The first four buttons are p1_sw_trig, p1_sw_top, p1_sw_aux1, and p1_sw_aux2. The remainder of the buttons are stored in p1_wheel and p1_aux in the most significant bits, which you have to test for with something like

Code:
switch_5=p1_wheel&(1<<7);
switch_6=p1_wheel&(1<<6);
etc.

Or are you just trying to use the default code without custom programming?
  #5   Spotlight this post!  
Unread 16-02-2007, 08:07
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: more buttons

Hey, thanks for the help, but we really don't understand what u mean by
Quote:
switch_5=p1_wheel&(1<<7);
switch_6=p1_wheel&(1<<6);
what are we supposed to do? is that like the defining process?
__________________
  #6   Spotlight this post!  
Unread 16-02-2007, 08:18
kaszeta's Avatar
kaszeta kaszeta is offline
Registered User
FRC #0095 (Grasshoppers)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2002
Location: Lebanon, NH
Posts: 334
kaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of light
Re: more buttons

Quote:
Originally Posted by joesmomh00haha View Post
Hey, thanks for the help, but we really don't understand what u mean by

what are we supposed to do? is that like the defining process?
That's typical code that you'll have to write to use those buttons, at least in MPLAB. I'm guessing there is something similar in EasyC.

If you are using the default code without any changes, you probably can't use those buttons.
  #7   Spotlight this post!  
Unread 17-02-2007, 09:16
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: more buttons

well we are using the mpLAB but could you tell me how to write it cuz it still is not working as we want.
__________________
  #8   Spotlight this post!  
Unread 17-02-2007, 09:19
kaszeta's Avatar
kaszeta kaszeta is offline
Registered User
FRC #0095 (Grasshoppers)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2002
Location: Lebanon, NH
Posts: 334
kaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of light
Re: more buttons

Quote:
Originally Posted by joesmomh00haha View Post
well we are using the mpLAB but could you tell me how to write it cuz it still is not working as we want.
What are you trying to do? Specifically, what do you want each of the 12 buttons you've programmed to do? (i.e. "we want button #8 to run the motor attached to pwm08)
  #9   Spotlight this post!  
Unread 17-02-2007, 10:25
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: more buttons

do you have any kind of messenger we could talk in (msn, Aim,yahoo) because we could explain everything to you faster and a lot easier like that....
__________________
  #10   Spotlight this post!  
Unread 17-02-2007, 10:38
kaszeta's Avatar
kaszeta kaszeta is offline
Registered User
FRC #0095 (Grasshoppers)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2002
Location: Lebanon, NH
Posts: 334
kaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of light
Re: more buttons

Quote:
Originally Posted by joesmomh00haha View Post
do you have any kind of messenger we could talk in (msn, Aim,yahoo) because we could explain everything to you faster and a lot easier like that....
Nope, sorry. (And I'm at the Connecticut Scrimmage now, actually)
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
Buttons, Buttons and more Buttons (2006) Freddy Schurr Team Organization 11 14-12-2005 21:36
UI Buttons stephenthe1 Programming 4 21-03-2005 12:58
Buttons tatsak42 Computer Graphics 4 16-01-2004 14:21
Buttons Rob Ribaudo Chit-Chat 11 06-04-2002 17:18
BUTTONS.... prtynpink5 Chit-Chat 10 27-03-2002 10:00


All times are GMT -5. The time now is 04:11.

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