This article will help prepare the student's devices to use the Loco Xtreme robots. The first thing a student should do after signing into the laptop is launch the Eclipse application. It can be found in the "eclipse" folder on the desktop as seen in the image below.
Once the "eclipse" folder is opened, the Eclipse application can now be launched. Locate the application as seen below and double click it.
Once the application is launched you will be prompted to specify a workspace directory as seen below. Do not change the highlighted directory. Check the box for "Use this as the default and do not ask again" and then hit the "Launch" button.
The next step is to copy the "Loco Xtreme" folder into the "eclipse-workspace" folder that was just created. You need to navigate to the C: drive of the laptop. To do this, click the "File Explorer" folder icon down in the taskbar seen below.
Click "This PC" in the left pane.
Double click the C: drive, "OSDisk".
Right click the folder called "LocoXtreme" and select Copy.
Now that folder needs to be pasted into the "eclipse-workspace" folder that was created when the Eclipse application was first opened. Navigate back to the C: drive by clicking OSDisk (C:) in the navigation bar at the top of the file explorer window.
Once you're back in the C: drive, double click the Users folder, find a folder that matches your school ID number and open it, then open the eclipse-workspace folder. Right click in an empty space in the folder and select Paste. You should see the "LocoXtreme" folder appear inside the "eclipse-workspace" folder as seen below.
Now you can go back to the Eclipse application and finish configuring it. Go to File -> Open Projects from File System -> Directory -> And navigate to and select the LocoXtreme folder that was added to the eclipse-workspace directory. Press Finish to complete this step. See the images below for additional help.
Next, go to Project -> Properties -> Java Build Path. Then, in the libraries tab, make sure LocoXtremeJar.jar and jSerialComm.jar are in the list. Select Apply and Close. If they do not show up, press Add JARs... and navigate to the location of them on your computer (inside of the LocoXtreme_JAVA_2.3 folder), and press open.
You should now be able to select and run example files located in the 'src' folder. You can run a file by having it open, having its tab selected and pressing the green circle, with a white play symbol, button.
Connecting to a Robot
1. Running the port_test.java file will print to the console any USB port connections found. If using a Windows OS, your USB port address will be in the form of “COM4”.
2. Run port_test.java first without the BLE Dongle plugged in, then again with the BLE Dongle plugged in. The difference in the list of ports should indicate the port address of the BLE Dongle.
3. Once you have your USB port address, open the robot_names_test.java file and replace the port name in line 14 with your own.
4. Turn on your LocoXtreme and run the robot_names_test.java file with the now-updated USB port address.
5. You should see your robot’s name listed in the Console.
6. With the USB port address and robot name, you can now open other files and run them after updating the USB port address and robot name in any file you are going to run with your own robot and BLE dongle.