View Single Post
  #2   Spotlight this post!  
Unread 10-02-2007, 15:47
paulcd2000's Avatar
paulcd2000 paulcd2000 is offline
Accidentally speaks in C
AKA: Paul Dagnelie
FRC #1719 (The Umbrella Corp.)
Team Role: Programmer
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Baltimore
Posts: 368
paulcd2000 is a jewel in the roughpaulcd2000 is a jewel in the roughpaulcd2000 is a jewel in the rough
Send a message via AIM to paulcd2000
Re: Programming a Joystick

Well, first off, what are you using EasyC or MPlab?
in MPLab, here's a sample alias: p1_sw_trig

what this means:
"p1" is the port it's plugged into
"_sw_" means it's a switch (you always need
"trig" means the trigger button. There's also "top" (which is the side button), aux1(the top left button), aux2 (the top right button), and wheel (the wheel, but i don't know what it returns)
they all return a 1 or 0 depending on whether the button is pushed or not.

For EasyC... get someone else. I have only used MPLab
__________________
"People don't say 'It's just a game' when their team is winning!" -- Scott Adams

5.5 students (on average)* $7/h *210 hours/student= $8085 of labor, all volunteered (not counting mentors', who are each that much)

We have blades on our robot?! ***sweeeeeet***

There are 11 types of people in the world. Those who can read binary, those who can't, and those who say this joke is supposed to be, "There are 10 types of people in the world. Those who can read binary and those who have a life."