IRSeekerV2

This is where you talk about the NXJ hardware related topics such as the brick, sensors, LEGO pieces, etc

Moderators: roger, 99jonathan, imaqine

IRSeekerV2

Postby MMG » Fri Mar 30, 2012 2:06 pm

Hello, I have a big problem with the IRSeekerV2. I want to find an infraredball, but the problem is that the values i recieve are bullshit. Also it says that it get an Direction, but the ball is off, so can other sources overlap the signal? My Code is like this...

Code: Select all
package test;

import lejos.nxt.*;
import lejos.nxt.addon.IRSeekerV2;



public class Bewegung
{
   public static IRSeekerV2.Mode AC;
   
   static IRSeekerV2 seeker = new IRSeekerV2(SensorPort.S1, AC);
   
   static UltrasonicSensor Sonic = new UltrasonicSensor(SensorPort.S2);
   
   static LCD Screen = new LCD();
   
   static NXTRegulatedMotor leftMotor = Motor.A;
   
   
   
   public static void main(String[] args) throws Exception
   {
      
      boolean start = false;
      
      if(Button.ENTER.isPressed())
      {
         start = true;
      }

      while(start)
      {
                  
         if(seeker.hasDirection())
         {
            LCD.drawString("ja", 5, 5);
         }
         else
         {
            LCD.drawString("Nein", 5,5);
         }
         
         if(Button.ESCAPE.isPressed())
         {
            start = false;
         }
      }
      

   }   

}



please help me. I'm despairing...
MMG
New User
 
Posts: 1
Joined: Fri Mar 30, 2012 1:53 pm

Return to NXJ Hardware

Who is online

Users browsing this forum: No registered users and 1 guest

more stuff