Strange Error During Bluetooth Connection

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

Moderators: 99jonathan, roger, imaqine

Strange Error During Bluetooth Connection

Postby pineapplemango64 » Thu Jul 10, 2014 1:56 pm

Hey all,

Recently, I wrote a program to allow one NXT to control another using the lejos.nxt.remote.* library. After pairing the two bricks, and running the program, the program stops with "Exception: 74 Failed to connect at: 224:54 at: 47:10" Any and all help would be greatly appreciated.

My program:
Code: Select all
import java.io.IOException;

import lejos.nxt.comm.Bluetooth;
import lejos.nxt.remote.*;
import lejos.nxt.Motor;
import lejos.nxt.Button;
import lejos.nxt.SensorPort;
import lejos.nxt.TouchSensor;

public class RemoteNxt {
   public static void main(String[] args) throws IOException{
      RemoteNXT RemoteNXT1 = new RemoteNXT("NXT ", Bluetooth.getConnector());
      Motor.A.setSpeed(900);
      Motor.B.setSpeed(900);
      Motor.C.setSpeed(450);
      TouchSensor ballShoot = new TouchSensor(SensorPort.S1);
      while (true){
         while(Button.RIGHT.isDown()){
            Motor.A.forward();
         }
         while(Button.LEFT.isDown()){
            Motor.B.forward();
         }
         while(Button.ENTER.isDown()){
            Motor.A.forward();
            Motor.B.forward();
         }
         while(Button.ESCAPE.isDown()){
            Motor.A.backward();
            Motor.B.backward();
         }
         while (ballShoot.isPressed()){
            Motor.C.backward();
         }
            
      }
      
   }
}
pineapplemango64
New User
 
Posts: 1
Joined: Thu Jul 10, 2014 1:52 pm

Re: Strange Error During Bluetooth Connection

Postby gloomyandy » Sat Jul 12, 2014 3:21 pm

The name of your nxt seems to include a space character, is this correct?
User avatar
gloomyandy
leJOS Team Member
 
Posts: 3992
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK


Return to NXJ Software

Who is online

Users browsing this forum: No registered users and 1 guest

more stuff