Go to Post Test your code and your assumptions. - ShotgunNinja [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 15-01-2008, 16:46
iwin2000 iwin2000 is offline
Registered User
no team
 
Join Date: Dec 2007
Rookie Year: 2008
Location: CT
Posts: 23
iwin2000 has a spectacular aura aboutiwin2000 has a spectacular aura about
Help on Programming

How do you program a button on the joystick in easy C
  #2   Spotlight this post!  
Unread 15-01-2008, 17:22
SgtMillhouse648's Avatar
SgtMillhouse648 SgtMillhouse648 is offline
Registered User
AKA: Malhon Godwin
FRC #0648 (QC Elite)
Team Role: Engineer
 
Join Date: Apr 2006
Rookie Year: 2005
Location: Davenport, IA
Posts: 153
SgtMillhouse648 has a spectacular aura aboutSgtMillhouse648 has a spectacular aura about
Send a message via MSN to SgtMillhouse648
Re: Help on Programming

If I'm remembering right, under the input section, there should be something about OI input or something like that. It should have an option for the switches from the joystick. You should then be able to then retrieve that switch (digital input) to a variable and do what ever you want with it then.
Good Luck
Malhon
__________________
2007-
Midwest Regional-
Regional Finalists with 1000 and 447
Rockwell Automation Inspiration in Control Award
Regional Woodie Flowers - Ed Wegscheid



  #3   Spotlight this post!  
Unread 15-01-2008, 17:24
JBotAlan's Avatar
JBotAlan JBotAlan is offline
Forever chasing the 'bot around
AKA: Jacob Rau
FRC #5263
Team Role: Mentor
 
Join Date: Sep 2004
Rookie Year: 2004
Location: Riverview, MI
Posts: 723
JBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond repute
Send a message via AIM to JBotAlan Send a message via Yahoo to JBotAlan
Re: Help on Programming

In the left window, under "RC Control", there's a "Digital OI Input" block. Let me know if you need more help than that.

JBot
__________________
Aren't signatures a bit outdated?
  #4   Spotlight this post!  
Unread 16-01-2008, 15:29
nandu10 nandu10 is offline
Registered User
FRC #2168 (Aluminium Falcons)
 
Join Date: Jan 2007
Rookie Year: 2006
Location: Groton CT
Posts: 1
nandu10 is an unknown quantity at this point
Re: Help on Programming

On the Digital Output/Input window there are only 4 choices for buttons on the joystick: trigger, aux1, aux2, and thumb. But on the joystick there is a big button between the aux1 and aux2. What is that button called? Where do you program that button in easyc?
  #5   Spotlight this post!  
Unread 16-01-2008, 16:03
Gamer930's Avatar
Gamer930 Gamer930 is offline
Team 930 and 171 Alumni
AKA: Justin
no team
Team Role: Alumni
 
Join Date: Mar 2002
Rookie Year: 2002
Location: New Berlin, WI
Posts: 388
Gamer930 is a splendid one to beholdGamer930 is a splendid one to beholdGamer930 is a splendid one to beholdGamer930 is a splendid one to beholdGamer930 is a splendid one to beholdGamer930 is a splendid one to beholdGamer930 is a splendid one to beholdGamer930 is a splendid one to behold
Re: Help on Programming

I believe this uses p#_aux input. How they do this is they have a different resistor on each of the switch positions and this will cause the number to be slightly different on the Analog Input.

What I would do is do a Print to Screen and move the switch around to see the number changes.

I can post back when I get a chance to test it tonight. Until then I would try doing different print screens of all the values
__________________
2010 to Present, Scorekeeper/Field Power Volunteer for FRC/FTC/FLL
2005 - 2010, Team 171 College Mentor
2002 - 2005, Team 930 Student
  #6   Spotlight this post!  
Unread 16-01-2008, 18:02
Kingofl337's Avatar
Kingofl337 Kingofl337 is offline
You didn't see anything....
AKA: Adam
FRC #0501 (Power Knights)
Team Role: Mentor
 
Join Date: Feb 2005
Rookie Year: 1998
Location: Manchester, NH
Posts: 861
Kingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond repute
Send a message via Yahoo to Kingofl337
Thumbs up Re: Help on Programming

You need to use the GetOIAnalog RC block for the hat switch.
__________________
FIRST Team 501 PowerKnights - Mentor
FIRST Team 40 Checkmate - Mentor Alum
FIRST Team 146 Blue Lightning - Alumni
  #7   Spotlight this post!  
Unread 16-01-2008, 22:45
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Help on Programming

Quote:
Originally Posted by nandu10 View Post
On the Digital Output/Input window there are only 4 choices for buttons on the joystick: trigger, aux1, aux2, and thumb. But on the joystick there is a big button between the aux1 and aux2. What is that button called? Where do you program that button in easyc?
Gamer930's answer is almost completely correct. The joystick "hat" switch is actually connected to the WHEEL input.
  #8   Spotlight this post!  
Unread 16-01-2008, 22:57
The Lucas's Avatar
The Lucas The Lucas is offline
CaMOElot, it is a silly place
AKA: My First Name is really "The" (or Brian)
FRC #0365 (The Miracle Workerz); FRC#1495 (AGR); FRC#4342 (Demon)
Team Role: Mentor
 
Join Date: Mar 2002
Rookie Year: 2001
Location: Dela-Where?
Posts: 1,564
The Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond repute
Send a message via AIM to The Lucas
Re: Help on Programming

This post should give you some idea what values the hat switch returns. I wouldn't use it for anything that needs fine control (like drive) but more like a few (4) buttons like the poster suggests.
__________________
Electrical & Programming Mentor ---Team #365 "The Miracle Workerz"
Programming Mentor ---Team #4342 "Demon Robotics"
Founding Mentor --- Team #1495 Avon Grove High School
2007 CMP Chairman's Award - Thanks to all MOE members (and others) past and present who made it a reality.
Robot Inspector
"I don't think I'm ever more ''aware'' than I am right after I burn my thumb with a soldering iron"
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
PLEASE HELP!! Need help programming arm?? amirjpl Programming 12 15-03-2007 15:11
HELP-URGENT PROGRAMMING HELP NEEDED Rohith Surampudi Lego Mindstorm Discussion 1 24-03-2006 23:05
programming help... Shlomi32 Programming 1 08-12-2005 12:28
Programming Help hedgehogger Programming 10 19-02-2004 12:11
help programming aZnXsa1Nt Robotics Education and Curriculum 5 17-12-2002 15:00


All times are GMT -5. The time now is 18:44.

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