View Single Post
  #12   Spotlight this post!  
Unread 29-05-2015, 21:46
TheModMaster8's Avatar
TheModMaster8 TheModMaster8 is offline
Active Alumni
FRC #5492 (Robo Jockeys)
Team Role: Alumni
 
Join Date: Apr 2015
Rookie Year: 2009
Location: USA, Kentucky
Posts: 119
TheModMaster8 is a jewel in the roughTheModMaster8 is a jewel in the roughTheModMaster8 is a jewel in the rough
Re: Need help with lego NXT lejos xbox controlling

Quote:
Originally Posted by Jalerre View Post
This might help. I have a little bit of experience using LeJos with an NXT with Bluetooth and Joystick control so I may be of some assistance.
I'll take you up on that offer, i got everything to work, but i am now stuck on how to integrate the xbox controller's inputs into the code. as far as i can tell, it is only passing on the key and then the keystroke reaches the robot, it goes forward, i want it to coast up to speed but i don't know if you can called in joystick function on the robot (server) side,
ex.
int i = 0
if(control.getAxisValue(1) > 0.35){
i = i +5;
Motor.BC.setSpeed(i) }
else
i=0;



how would i add this to the code?
__________________
2009-2011: (FLL) Robot Builder / Operator
2012: (FRC Team 2783) Fabrication / HumanPlayer / FLL Ref
2013: (FRC Team 2783) Fabrication / HumanPlayer / FLL Ref
2014: (FRC Team 2783) Fabrication Student Lead / HumanPlayer / FLL Ref
2015: (FRC Team 2783) Fab Student, Teacher / HumanPlayer / Backup Driver / FLL Ref / FLL Mentor of 6 Teams
2016: (FRC Team 5492) Fabrication Student Lead / Driver / FLL Mentor of Crestwood Elementary
Past Alliance:(2783, 1208, 4154)(2783, 1002, 4265)(2783, 1182, 3868)(2783, 451, 4028)(2783, 1208!, 1288)(5492, 63, 1014) I Will Never Forget