Go to Post You have the right to remain silent. Anything you say can AND WILL be held against you (AND YOUR TEAM) in the court of public opinion. So choose what you do wisely. - Koko Ed [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

 
 
 
Thread Tools Rating: Thread Rating: 9 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #12   Spotlight this post!  
Unread 20-02-2005, 01:53
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,862
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Programming - Getting Started

Quote:
Originally Posted by Matt_Kitts
can anyone help me out with programming the buttons on the joy sticks`
Each OI joystick port has the 2005 KoP joystick buttons available in the default code as follows:
For Joystick Port 1:
  • p1_sw_top - thumb button
  • p1_sw_trig - trigger button
  • p1_sw_aux1 - button to the left of the "hat" switch on the front face
  • p1_sw_aux2 - button to the right of the "hat" switch on the front face
The other Port buttons follow the same naming convention, e.g.,
p2_sw_top would be on joystick Port 2, p3_sw_top on Port 3, etc.

They are used in your code like this:
Code:
if (p2_sw_top == 1)
printf("Hello FIRST\r");
else
printf("Goodbye cruel world\r");
There are also two analog inputs unused by the KoP joystick and the analog "hat" switch (that returns odd values).
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 20-02-2005 at 01:59.
 


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
Book on C programming - suggestions? wun Programming 18 14-01-2005 00:12
Help needed for getting started! chantilly_team Programming 4 27-10-2004 08:29
Autonomous Programming Competition Signup List SilverStar Programming 36 13-05-2004 15:09
Robot Programming Education phrontist Programming 11 03-05-2004 07:32


All times are GMT -5. The time now is 13:22.

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