Master/menu infrastructure for running FIRST LEGO League mission programs written in leJOS on the EV3
Author: John Meshulam
FLL-leJOS was created with FLL teamns in mind and aims to provide an intuitive and simple way to program FLL robots using Java.
- Simple to use and teach while installed
- Intuitive and accessible even for teams with little/no coding experience
- Provides a menu for selecting runs, similar to Mindstorms
- Provides support for interrupting robot actions and restarting failed runs instantly
- Complicated setup that requires moderate experience with Java and file handling
- Menu is still extremely basic and some tools are still missing (This will be fixed at a later date)
- Although FLL-leJOS is significantly simpler to use than vanilla leJOS, basic (and some intermediate) Java is still required for teams to use properly. This takes time and effort to teach, and may not fit all audiences.
- EV3 Brick
- Micro SD or Micro SDHC card (NOT SDXC!) with at least 4-32GB. (Cards with over 32GB will not work!)
- A Computer running windows 7 or later, with an SD card reader
- OPTIONAL: Bluetooth or wifi capability
- Patience. The setup and install process is long and complicated. Don't be afraid if it fails the first time.
- Download JDK-8 (latest update, windows x64) from the official Oracle website
- Download the latest leJOS EV3 from the lejos sourceforge page. When the installer completes, do not run the EV3SD utility.
- Format the SD card (You can use the official SD association software available on their website)
- After you have finished formatting, it's time to create the embedded JRE. These instructions are adapted from this lejos forum post
- Step 1: Download and install 7-Zip (win64) from the official website
- Step 2: Go to this ejdk download page and download Java SE embedded version 8
- (This will download
ejdk-8-fcs-b132-linux-arm-sflt-03_mar_2014.tar.gz
, which I will refer to as the embedded JDK file) - Step 3: Create a directory somewhere on your disk. For the rest of this tutorial I will be using
C:\myLejosInstall
- Step 4: Unzip the embedded JDK file in
C:\myLejosInstall
. For simplicity purposes, rename the extracted directory toejdk8
- Step 5: Start a new CMD window inside
C:\myLejosInstall
. This can be done by pressingSHIFT + Right Click
and selectingnew command prompt window here
. If you are using windows 10, open a powershell window instead and typecmd
to switch to command prompt. - Step 6: Enter the following commands:
This will create the new EJRE files in a directory named
$ cd ejdk8\ejdk1.8.0\bin $ jrecreate.bat --dest newjre --profile compact2 --vm client
newjre
located underejdk8\ejdk1.8.0\bin
. Wait for the process to complete, and then close the cmd window. - Step 7: Open
C:\myLejosInstall\ejdk8\ejdk1.8.0\bin
, and move thenewjre
directory toC:\myLejosInstall
- Step 8: Rename the
newjre
directory toejre-8-b132-linux-arm-sflt
(IMPORTANT!) - Step 9: Right click on the directory, select 7Zip -> Add to archive. Select the tar format and accept. This should create
ejre-8-b132-linux-arm-sflt.tar
- Step 10: Right click on the directory again, select 7Zip -> Add to archive. Select the gzip format and accept. This should create
ejre-8-b132-linux-arm-sflt.tar.gz
- Open your newly formatted SD card with file explorer, and copy the
ejre-8-b132-linux-arm-sflt.tar.gz
from the previous step to it. - Go to your leJOS install location (default:
C:\Program Files\leJOS EV3
) - Extract the
lejosimage.zip
file using 7Zip to your SD card. - Remove the SD card from your computer, insert it into your EV3 brick, and power on. If you have completed all the steps properly, it will start install leJOS, which takes around 10 minutes. If it doesnt work, go ahead and redo step 4, which is where most problems occur.
(If you did not install leJOS for the EV3 brick first, complete steps 1 and 2 from the EV3 setup before starting)
- Download eclipse from the official website. Run the installer and select
Eclipse IDE for JAva Developers
- Open eclipse, select Help -> Install new software
- Follow the instructions on the leJOS wiki to install the leJOS eclipse plugin
- Setup your brick name and IP to something unique instead of the default
EV3
and10.0.1.1
. This is done via the brick's on-screen menu:- Select
system
andChange name
to set the brick name - Select
PAN
,Access pt
,Address
,Advanced
, set your desired IP, and press theback
button until you return to the main menu. The brick will take a few seconds to set your IP after you exit!
- Select
- On the PC, open
Control Panel
, and selectNetwork and Sharing Center
. There should be aChange adapter settings
option on the top left corner. Click it, and a new window should open. - Inside the new vindow, click on the
Bluetooth network connection
adapter, and selectView bluetooth network devices
from the top bar.- a. If this is the FIRST TIME you are connecting this brick to the PC, select
Add a device
, wait for the PC to recognize it (this may take 2-3 minutes!), and complete the setup process. You will be prompted for a password which will be1234
unless it has been changed by the user.
- a. If this is the FIRST TIME you are connecting this brick to the PC, select
- Select your device from the menu, and click
Connect using
Access point
from the top bar. If you completed this process corretly, a propt will show up with the Bluetooth icon and the wordsconnection succcessful
- Open Eclipse, select
Window
,Preferences
, and enter the EV3 tab. CheckConnect to named brick
and input your brick's IP.
- Stick one end of the USB cable into the PC
- Stick the other end of the USB cable into the EV3
- Profit.
- Open Eclipse, select
Window
,Preferences
, and enter the EV3 tab. CheckConnect to named brick
and input your brick's IP
- Go to the
releases
tab of this project - Download the source code
- Inside Eclipse, right click inside the package manager and select
import
. Under theGeneral
folder, select theArchive File
option, and complete the import process. - Right click the project. Select
leJOS
->convert to leJOS EV3 project
For information about pushing your robot code and using Git from Eclipse in general, check out this guide.
- Inside Eclipse, right click inside the package manager and select
import
. Under theGit
folder, use theProjects from git (with smart import)
option (If your eclipse is older, you will not have this option. In that case, download git for windows and use git bash, or update your Eclipse) - Paste the repository URL inside the first field, and finish the import. Everything will updaate automatically.
- Right click the repository. Select
leJOS
->convert to leJOS EV3 project
For information about pushing your robot code to another repository, and using Git from Eclipse in general, check out this guide.