Getting Started on OSX
|
Getting Started on OSX
This version of the tutorial is for the 0.85 release of leJOS NXJ and is compatible with OSX10.4 or higher and both intel and ppc processors. PrerequisitesStandard Lego SoftwareTo run leJOS NXJ on OSX you will need the standard Lego software installed so that you can connect to your NXT using USB. Intel macs require the 10.5 firmware (fix) update. This is true for OSX10.4 intel users as well. We have had several users report that this works... (the 10.5 update installer actually checks if your OS is 10.3+). PPC users need the 1.02 driver. Java Development KitYou will also need a Java Development Kit (JDK). Note that a Java Runtime Environment (JRE) is not sufficient as it does not allow you to compile Java programs. You can download the latest JDK from http://java.sun.com/. Follow the instructions for installing it. The 32 bit version of Java is required and at this time only version 1.5 is 32 bit. Downloading and Untarring LEJOS SoftwareYou can download the leJOS NXJ software from The leJOS NXJ download page. Un-tar the release (you do not need to run the build script) (Optional) Bluetooth StackIf you want to communicate with the NXT over Bluetooth, you will need a Bluetooth dongle or built-in support on your Mac, and a Bluetooth software stack. LEJOS is distributed with a 3rd party stack that is configured by default -- bluecove. Setting up the EnvironmentEnvironmental VariablesYou need to set the following:
You can set these environment variables either as user or system variables depending on whether you want leJOS NXJ to be available to just the current user or to all users. Set Up for Current UserCreate or Edit If it does not exist, you can create it with TextEdit. If it exists, you can open it from a command prompt:
Example:
Set Up for All UsersSame as for Current User set up except use:
Example:
Setting PermissionsMake the script files in the leJOS bin directory executable by cd'ing to that directory and executing the command.
Configuring USBThe fantom driver is now distributed with leJOS and configured as the default. There is no need any longer to do so in This means no additional driver download is necessary. The Standard Lego Software is the only prerequisite. (Optional) Testing with nxjbrowseTest it by running Flashing the FirmwareAs leJOS NXJ is a firmware replacement, you will need to flash the firmware to your NXT. Note that this will overwrite any existing firmware. If you have a previous version of leJOS NXJ on your PC your existing files will be preserved, but if you have the standard LEGO firmware or other third-party firmware on your NXT, existing files will be lost. Make sure your NXT is attached by its USB cable, and switch it on by pressing the orange button. You can either use the command line Using the command line: Type Using the GUI version: The GUI version of nxjflash is NXJFlashG. You start it by running the file nxjflashg from the leJOS NXJ bin folder. When the program window opens, click on Start Program and follow the instructions. A more complete explanation is in the Windows tutorial "PC GUI Tools" section. |
|