howto-calibrate-differential robot

This is where you talk about the EV3 software itself, installation issues, and programming talk.

Moderators: roger, gloomyandy, skoehler

New User
Posts: 1
Joined: Sat Jun 07, 2014 8:27 pm

howto-calibrate-differential robot

Postby mwareman » Sat Jun 07, 2014 8:56 pm


I am very new to programming the EV3 using Java. I have been following Miguel's posts and have run into a bit of a problem with this program:

First issue is that Eclipse is telling me that it does not know what TerminateRobot is. Miguel told me that I needed to: the TerminateRobot class ... But, I do not know how to make it part of the program. I tried just typing in the lines he provided either before the DrawSquareCallibration class or after it but that does not fix the error message. What do I need to either the program or with Eclipse to make this work?

Second issue is that Eclipse also complains that the 2 RegulatedMotor commands before the TerminateRobot lines with this message:
Resource leak: left never closes
I suspect that this is related to the TerminateRobot lines but I am not sure. How do I fix this issue?

Thank you for your help.

User avatar
leJOS Team Member
Posts: 5620
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Re: howto-calibrate-differential robot

Postby gloomyandy » Sat Jun 07, 2014 10:44 pm

To add an existing .java file to a project....
1. Cling on the project to select it.
2. From the file menu select import
3. select general>file system
4. Browse to the directory containing your new java file.
5. Select the file you want to import
6. Browse to the the directory that contains your other project source files.
7. Import the file by clicking finished.

To add a new .java file right click on the project and select new>class, use the wizard to define the class. You can then copy and paste the program source into this file.

The warning is telling you that the code does not close the left and right motor objects before it exits. In this case this does not really matter, but not doing so could result in potential resource leaks so it is good practice for your programs to include code to exit them and to tidy things up by stopping the motors and closing any devices etc. that need it.


Return to “EV3 Software”

Who is online

Users browsing this forum: No registered users and 1 guest