Saturday, August 14, 2010

Customizing the GUI

I have been asked how to change the GUI’s connect panel to change the name and Bluetooth address of the NXT or NXTs you want to connect to.

In the ConnectPanel.java file, you need to change these two lines of code:

private static final String[] _robotNames = {"MONTE", "Wayfinder"};
private static final String[] _robotAddresses = {"00:16:53:00:57:37","00:16:53:08:82:3a"};

In my particular case, my NXTs are called MONTE and Wayfinder; their Bluetooth addresses are 00:16:53:00:57:37 and 00:16:53:08:82:3a respectively.

For example, if your NXT is called Delta with a Bluetooth address of 00:16:53:00:00:00, then the two lines of java code should read:

private static final String[] _robotNames = {"Delta"};
private static final String[] _robotAddresses = {"00:16:53:00:00:00"};

Thank you for your feedback.

In my next posts, I’ll show you how to change the NXT’s map, and how to build the robot in Lego.

No comments: