How should i approach this? i just need that to get started, we're trying to make a turret gun with motion dtection via webcam, and an authorisation module to turn it off remotely. i'll post some pieces of code when we have it working
Thanks, T
Moderators: roger, 99jonathan, imaqine
NXTInfo henk=new NXTInfo("NXT", "00165306DBC4") ; and then
try {
nxtComm.open(henk);
} catch (NXTCommException e) {
System.out.println("Exception in open");
}public Remote()
{
try {
nxtComm = NXTCommFactory.createNXTComm(2);
} catch (NXTCommException e) {System.out.println("Error 1");}
nxtInfo = new NXTInfo("NXT","00:16:53:03:67:69");
}
private class Connector extends Thread
{
public Connector()
{
start();
}
public void run()
{
connectStatus = CONNECTING;
try {
nxtComm.open(nxtInfo);
OutputStream os = nxtComm.getOutputStream();
dos = new DataOutputStream(os);
InputStream is = nxtComm.getInputStream();
dis = new DataInputStream(is);
connected = true;
connectStatus = CONN_SUCCESS;
sendCommand(ACTIVE);
}
catch (NXTCommException e)
{
connectStatus = CONN_FAILURE;
}
}
}
try {
beweeg = NXTCommFactory.createNXTComm(NXTCommFactory.USB);
Cam = NXTCommFactory.createNXTComm(NXTCommFactory.USB);
} catch (NXTCommException e)
{
System.out.println("Failure to load comms driver");
}
NXTInfo TurretCam = new NXTInfo( "NXT", "00165302D893");
NXTInfo TurretMove =new NXTInfo("NXT", "00165306DBC4") ;
try {
Cam.open(TurretCam);
} catch (NXTCommException e) {
System.out.println("Exception in open");
}
try {
beweeg.open(TurretMove);
} catch (NXTCommException e) {
System.out.println("Exception in open");
}Users browsing this forum: No registered users and 1 guest