Monday, 6 February 2012

lab1

Lab1

Troels Mortensen, 20072680
Kristian Barret, 20073457
Tore, 20072415

The goal for today is getting the NXT up and running, getting familiar with the leJOS system and completing the lab excercises.

The plan was then:
Getting firmware installed
Getting JDK, JRE installed
Building the car
Transfer software to NXT.

It turns out it doesn’t run on windows 64bit. Trying to install JDK, JRE 32bit, according to http://lejos.sourceforge.net/nxt/nxj/tutorial/Preliminaries/GettingStartedWindows.htm
The solution was apparently to set the environment variables. And I had to download the fantom driver from http://mindstorms.lego.com/en-us/support/files/Driver.aspx

Then I could not install the lejos plugin in eclipse. With a little help from “voodoo Troels” I finally was able to transfer the LineFollower to the NXT brick via the command promt
In the command promt we use nxjc to compile, and nxj -r to push the example program “Tune” to the NXT brick. This, however, didn’t work for our own program, and I had to go through a few extra steps:

Using this
http://lejos.sourceforge.net/nxt/nxj/tutorial/Preliminaries/CompileAndRun.htm
to compile, transform and upload the program. Step by step in the command promt:
* Be in the directory. eg:    c:\users\tm-lappy\desktop  (where my .java file is).
* nxjc -bootclasspath “c:\program files (x86)\leJOS NXJ\lib\nxt\classes.jar” LineFollower.java
* nxjlink -v LineFollower -o LineFollower.nxj
* nxjupload LineFollower.nxj

It was harder to get it working than expected, and I ended up spending a lot of time on very little. I hope installing the system with the other group members will be easier, with them relying on my experience.

No comments:

Post a Comment