NXT GamePad (Updated January 2009)


NXT GamePad is a PC utility software for Bluetooth data logging and analog game pad remote control. NXT GamePad enables user to remotely control a NXT which uses nxtOSEK Bluetooth API via Bluetooth by using a PC analog game pad controller. User also could select 'Analog Stick Control' and/or 'NXT Data Acquisition' features depending on purposes. Even if user did not have an analog game pad, NXT GamePad could be used for only 'NXT Data Acquisition' (data logging).
According to LEGO, there seems to be some Bluetooth devices compatibility issue on NXT. So we have tested only the following combination of the PC and the devices.

When NXT GamePad is used as 'Analog Stick Control', NXT GamePad sends value between -100 and 100 depending on the position of the analog sticks. NXT GamePad sends the position of the left analog stick in vertical direction (up to down = -100 to 100) and the position of the right analog stick in horizontal direction (left to right = -100 to 100).

NXT GamePad is provided as a zip file (see Downloads section). NXTGamePad.exe is allocated in the extracted NXTRemote\Release directory and C/C++ source code is also available.

To establish a Bluetooth connection between the PC and the NXT, the following steps are needed:
1. Upload a nxtOSEK program which uses Bluetooth API to the NXT and start nxtOSEK and display nxtOSEK main screen by pressing RUN button.

2. While nxtOSEK main screen is displayed, the NXT is waiting for a Bluetooth connection request from the PC. If your NXT was configured as a Bluetooth slave device, Bluetooth Device Address could be displayed at the upper left of the screen. This is useful to distinguish your NXT when multple NXTs were turned on. If the NXT was failed to get Bluetooth Device Address, "BD_ADDR: Failed..." message is appeared instead of the address. In this case, it needs to re-start the NXT.

3. After attaching the Bluetooth dongle on your PC, open the Bluetooth configuration dialog. You can usually bring up this page by double-clicking the Bluetooth icon in the taskbar.

4. Select Add a new connection or instruct the PC to search for Bluetooth devices which are in range.

5. Once the device is found, it needs to fulfill the defined pass key for pairing the NXT and your PC.

6. Once the device is paired, view the properties or details to find out which COM port has been assigned to the NXT. Sometimes two ports are assigned. In this case, you want the outbound connection. If the Bluetooth manager does not list the COM port, open the Device Manager on your PC and view Ports (COM & LPT) to help discover the COM port which is assigned to your NXT connection.

7. Double click NXTGamePad.exe and the below dialog should come up. Select 'Setting' button to configure the COM port which is already connected to the Bluetooth device.

8. COM port setting dialog comes up and assign the COM port number which is configured as the outbound connection, Since V1.01, you can select 'Analog Stick Control' and/or 'NXT Data Acquisition' features depending on purposes. Even if you did not have an analog gamepad, NXT GamePad can be used for only 'NXT Data Acquisition' (data logging), then select 'Connect' button.

9. If Bluetooth connection was successfully completed, the below dialog would come up and [BT] also comes up on the NXT LCD.



10. If your analog game pad also supported digital inputs, you need to turn on the analog mode button on the game pad before starting the application on the NXT by turning on the 'RUN' button. In case of BUFFALO digital/analog game pad, there are two analog sticks. For example, the stick on the left side (up and down direction) is used to control the speed of NXT GT and the stick on the right side (right and left direction) is used to control the steering of NXT GT.

11. When you stop a data logging, you need to select 'Stop' button to save the logged data to a CSV file. If you want to start/stop the data logging multiple times through a Bluetooth connection, please select 'Start' and 'Stop' buttons. every time you select the 'Stop' button, you can save the logged data into the specified CSV file. This is a convenient feature to log the data of your NXT application effectively.

12. When you exit from the NXT GamePad, at first, select EXIT button on the NXT GamePad and then, push STP button on the NXT. When you use NXT GamePad again, perform the instruction step 7 to step 11.




Back to Utilities