Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   FIRST Tech Challenge (http://www.chiefdelphi.com/forums/forumdisplay.php?f=146)
-   -   [FTC]: controller programming (http://www.chiefdelphi.com/forums/showthread.php?t=76577)

chopperdudes 06-04-2009 23:59

[FTC]: controller programming
 
does anyone know how to use the up/down/left/right arrows on the left side of the controller? as in how would you refer to them in the programing? from what our programmer said, he cannot figure it out =(

thanks a ton guys!

gdo 07-04-2009 06:16

Re: [FTC]: controller programming
 
what language are you guys using?

chopperdudes 07-04-2009 09:42

Re: [FTC]: controller programming
 
oh sorry we're using RobotC

595294001 07-04-2009 09:53

Re: [FTC]: controller programming
 
The top-hat activates like this:

"if(joystick.joy1_TopHat == 1){
//do something
}"

It's really just four buttons and the variable "joystick.joy1_TopHat" will contain one of five values representing the pressed button (the fifth value is for no buttons). I forget which order the buttons correspond in now, but it's pretty easy to use,

Good luck and we'll see you in atlanta,

Alex
2820

dooey100 07-04-2009 17:35

Re: [FTC]: controller programming
 
actually there are the 4 cardinal directions and 4 diagonals, plus the no buttons pushed "direction" is 9

chopperdudes 07-04-2009 19:03

Re: [FTC]: controller programming
 
wow thanks for the quick reply!!

Thanks alot guys, it should be easy for me to figure out.


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

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi