Hobby project – Lego NXT, XBox 360 controller, PC and C#. Part 1

By | 1. August 2015

As summer holiday is still on here we stared  project to control Lego NXT robot with XBOX 360 wireless controller.

First we prepared hardware :

1. Lego Mindstorm NTX. Already present, luckily basic driving robot version was assembled last time when it was used.

Lego Mindstorm NXT

Lego Mindstorm NXT

2. Xbox 360 controller. Already present

XBOX 360 Controller

XBOX 360 Controller

3. Computer. Check!. Using Windows 7

4. Bluetooth for communicating with NXT. As we use PC, not laptop we will need adapter. Found in the bottom of drawer. Check!

If you would use laptop then chances are good that it has integrated bluetooth adapter.

Bluetooth Adapter

Bluetooth Adapter

5. A standard Xbox 360 wireless controller can be connected to a Windows PC, but you must have an Xbox 360 Wireless Gaming Receiver.

You can see more about it at support.xbox.com

So we had to buy one. ordered cheaper analog (5.39 GBP) instead of Microsoft original one (16-20 GBP). The original does not have any possible dirver issues, but this was the risk we took.

Xbox 360 Wireless Gaming Receiver

Xbox 360 Wireless Gaming Receiver

First we installed drivers what came with devise and after that drivers from Microsoft site Xbox 360 Wireless Controller for Windows 

PS! Tried later on Windows 10 but device was not recognized as compatible. Not sure if it is thirdparty driver issue or will same happen with original Microsoft Gaming Receiver.

Next step was to connect PC and NXt via Bluetooth. It is general procedure in Windows

1. Open the Start Menu, click on Devices and Printers, right click on the appropriate adapter, and select “Bluetooth Settings”.

2. Make sure “Allow Bluetooth devices to find this computer”, “Allow Bluetooth Devices to connect to this computer”, and “Alert when a new Bluetooth device wants to connect” are checked.

3. Turn on the NXT brick, navigate to the Bluetooth menu, and make sure Bluetooth is turned ‘On’ and Visibility is set to ‘Visible’; then, select ‘Search’. This will start the pairing process between the NXT and the computer.

4. The NXT will pull up all available devices within range, including other eligble NXT bricks, that have Bluetooth enabled and turned on. Select your computer from the list and select ‘Connect’. If you do not know your computer’s name, navigate to Start Menu> All Programs> Accessories> System Tools> System Information. Your computer’s name is “System Name”.

5. Select which port on the NXT you would like to save the connection to and enter your passkey when prompted (1234 by default) and select the check mark.

6. Windows should recognize that there is a new connection and will pop up another notification saying so. Click on the notification and enter the passkey for the NXT when prompted, then click ‘Next’.

7. Windows will finish connecting to the NXT and display “Your device is ready to use notification” when completed.

You can see detailed and illustrated guide for example here

After this step after this step hardware is ready.

In next post. Setting up programming enviromnent – Visual Studio 2015 and libraries for communicating with hardware

One thought on “Hobby project – Lego NXT, XBox 360 controller, PC and C#. Part 1

  1. Pingback: Hobby project – Lego NXT, XBox 360 controller, PC and C#. Part 2 - Software Blog

Leave a Reply