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

Moderators: 99jonathan, roger, imaqine


Postby nikita190 » Mon Apr 09, 2012 8:29 pm

Hello ..
I have a problem with the IR sensor Seeker. I was working in Netbeans and I switch to eclipse.
And to get the ball with "seeker.getDirection ();" just read "-1"
And also tell me that "seeker.setAddress(0x8);" is not in use

Code: Select all
package com.mydomain;

import lejos.nxt.SensorPort;
import lejos.nxt.addon.CompassHTSensor;
import lejos.nxt.addon.IRSeeker;

public class HelloWorld
     * @param args
   private static IRSeeker seeker;
   private static CompassHTSensor compas;

   public static void main(String[] args)
          seeker = new IRSeeker(SensorPort.S4);
          compas = new CompassHTSensor(SensorPort.S2);
          int t,g;
               g = (int)compas.getDegrees();
               t = seeker.getDirection();

I'm using:
- Jdk-6u25-windows-i586
- Lejos_nxj_0.9.0
- Eclipse
- Win 7--64
Last edited by nikita190 on Mon Apr 09, 2012 10:12 pm, edited 1 time in total.
New User
Posts: 18
Joined: Mon Mar 26, 2012 10:48 pm

Return to NXJ Software

Who is online

Users browsing this forum: Google [Bot], Yahoo [Bot] and 1 guest

more stuff