NXT Using Joysticks
(→Joystick Control - Game) |
(→Joystick Control - Game) |
||
| Line 109: | Line 109: | ||
<br /> | <br /> | ||
| − | == Joystick Control - | + | == Joystick Control - Competition== |
{| style="font-family:Verdana, Geneva, sans-serif; color:black; background-color:#FFFFFF; text-align:left; font-size:100%;" width="100%" cellpadding="5%" cellspacing="0" border="0" | {| style="font-family:Verdana, Geneva, sans-serif; color:black; background-color:#FFFFFF; text-align:left; font-size:100%;" width="100%" cellpadding="5%" cellspacing="0" border="0" | ||
|- | |- | ||
| Line 118: | Line 118: | ||
*Go to the "Window" menu | *Go to the "Window" menu | ||
*Choose the "Menu Level" sub-menu | *Choose the "Menu Level" sub-menu | ||
| − | *Click on the "Expert" menu option | + | *Click on the "Expert" or "Super User" menu option |
|- | |- | ||
|[[File:NXT Joystick Level.png]] | |[[File:NXT Joystick Level.png]] | ||
|- | |- | ||
| − | |After setting the Menu Level to "Expert", you can then access the "Joystick Control - Game" station by: | + | |After setting the Menu Level to "Expert" or "Super User", you can then access the "Joystick Control - Game" station by: |
*Downloading your program and starting the debugger | *Downloading your program and starting the debugger | ||
*Going to the "Robot" menu | *Going to the "Robot" menu | ||
*Choose the "Debug Windows" sub-menu | *Choose the "Debug Windows" sub-menu | ||
| − | *Click on the "Joystick Control - | + | *Click on the "Joystick Control - Competition" menu option to open the Controller Station |
|- | |- | ||
|[[File:Debug menu joystick.gif]] | |[[File:Debug menu joystick.gif]] | ||
Revision as of 14:13, 11 September 2012
| For ROBOTC Joystick NXT functions, check out the NXT Joystick Functions page!
|
|
Joystick Control
| ROBOTC supports using Logitech USB joystick controllers to drive your NXT over the USB or Bluetooth communication link. This allows the user to send commands to their robot in real time, rather than having only pre-programmed behaviors.The joystick functionality works by taking data from the joystick controller and sends it to the NXT over the debugger link as a single message.
getJoystickSettings(joystick); |
#include "JoystickDriver.c" // Tells ROBOTC to include the driver file for the joystick. task main() { while(true) { getJoystickSettings(joystick); // Update Buttons and Joysticks motor[motorC] = joystick.joy1_y1; motor[motorB] = joystick.joy1_y2; } } |
Buttons
Joystick Control - Simple
Joystick Control - Competition








