We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProcessing DevelopmentLibraries,  Tool Development › wrj4P5, WiiRemote P5 Library - Alpha
Pages: 1 ... 11 12 13 14 15 16
wrj4P5, WiiRemote P5 Library - Alpha (Read 93296 times)
Re: wrj4P5, WiiRemote P5 Library - Alpha
Reply #180 - Feb 26th, 2009, 12:13am
 
Classic:
So I added a draw() method to my sketch which resulted in the same results.  Im going to try redownloading the libraries, and hope that the file I am missing is contained in the new libraries.
Re: wrj4P5, WiiRemote P5 Library - Alpha
Reply #181 - Feb 26th, 2009, 11:52pm
 
This is a really cool idea!

I have some problems though. I'm running Xubuntu 8.10 (Intrepid) on an Asus Eee 900 with a Trust(Broadcom) micro USB BT adaptor. I couldn't get the sample I took from the website (the simple one with a box) to work when I compiled the avetanaBT. Instead, I took and renamed the BlueCove GPL (http://www.bluecove.org/bluecove-gpl/index.html) version for Linux to avetanabluetooth.jar, alongside with the BlueCove 2.1.0 and placed the files like this:

<sketch folder>/libraries/
- Loc
 - library
   - Loc.jar
 - lll (with content of Loc zip)
- wrj4P5
 - library
   - avetanabluetooth.jar (formerly bluecove-gpl-2.1.0.jar)
   - bluecove-2.1.0.jar
   - WiiRemoteJ.jar (v. 1.5)
   - wrj4P5.jar
 - lll (with content of wrj4P5 zip)

This was the only way I could get it to compile and when it runs it says:

BlueCove version 2.1.0 on bluez
trying to find a wii
(also, I can see the BT adaptor blinking like when it searches for devices)

However, no matter how many times I try to push 1+2 on my WiiMote, nothing more happens. I know that I haven't followed the guide completely but I have a fear that it is due to bluez having problems pairing with the WiiMote. The only way I can connect to it is with wmgui, wminput and hidd. If I try hcitool, nothing happens when I use for instance "sudo hcitool cc <BT address of WiiMote>". Any graphical bluez tool fails instantly, most likely because the WiiMote cannot enter a pairing code. I'm afraid all this means that my WiiMote and my PC have not been paired yet, thus failing to work with Processing. Any suggestions? Smiley

Thank you very much for developing this, it will be extremely useful for many people - I actually hope it will some day be a part of Processing itself as I think it fits very well with the concept.
Re: wrj4P5, WiiRemote P5 Library - Alpha
Reply #182 - Feb 27th, 2009, 11:59am
 
Classiclll wrote on Feb 25th, 2009, 4:58pm:
to all user
i'm in the battle with P5 1.0.1 in case of two remotes on the PPC Mac with the OSX 10.5.5.
currently i have no reproductive condition.
any status report are welcome.


Hi,

Do you mean that you need someone with a PPC running 10.5.5 to do some test
I've go one at home. I can do some test for you if you need, just tell me what I  have to do.
I will be glad to help.
Re: wrj4P5, WiiRemote P5 Library - Alpha
Reply #183 - Feb 27th, 2009, 11:35pm
 
Classiclll:
So I redownloaded all new libraries and the newest version of processing, and I got rid of the error(!)only to have another one:
java.lang.IllegalStateException: Bluetooth failed to initialize. There is probably a problem with your local Bluetooth stack or API.
I am using a rocketfish stack, and can successfully sync up my wiimote with other applications VIA blue tooth.  Any advice?
Re: wrj4P5, WiiRemote P5 Library - Alpha
Reply #184 - Feb 28th, 2009, 9:35am
 
thank you very much, everybody!

>DGS3
your trouble is now "Bluetooth failed to initialize", isn't it?
i don't know your "rocketfish stack".
what message on your text pain of P5?
when you run your sketch, it will say like "BlueCove version 2.0.3 on mac".
would you try WiiremoteJ v1.6 (newest) ?
the following forum may be useful.
http://www.wiili.org/forum/wiiremotej-f68.html

>ALJ
your setting is seemed to be good.
your trouble likes my one on my ppc mac, osx 10.5.5.
now the success probability of my trial is growed up with
Processing 1.0.3 + WiiremoteJ v1.6
would you try above newest combination ?
btw, i don't have any experience of linux, but i can say there is no needto rename BlueCove-gpl's name.
above link to wiili.org includes tips on linux.
things about blueZ/BlueCove-gpl, please ask to bluecove forum, sorry.
http://groups.google.com/group/bluecove-users

>TM
thank you for your offer.
can you try the following codes on your mac, if you have two or more remotes?
this sktch is an intermediate code to detect 3D position of an IR-Pen with 2 motes.
Quote:
import lll.l4P5.*;
import lll.wrj4P5.*;
import lll.Loc.*;

PGraphics bg;
Wrj4P5 wii;
Remote r1,r2;
Rod lay1,lay2;
Loc rl1=new Loc(.5,.5,-1);
Loc rl2=new Loc(.1,.5,-1);

void setup() {
  size(400, 300, P3D);
  bg = createGraphics(400,300,P2D);
  l4p5.setup(this);
  wii = new Wrj4P5(this);
  wii.connect(2,Wrj4P5.EX,false);
  r1 = new Remote(wii.rimokon(0), new Loc(0,10,100));
  r2 = new Remote(wii.rimokon(1), new Loc(0,200,100));
  frameRate(20);
}

public void draw() {
  if (wii.isConnecting()) return;
// 2D drawing with ir information from 2 remotes
//  background(0);
  background(irView(bg,wii));
// 3D drawing, the real world
  translate(400,150,0);
  lights();
  camera(600.0,600.0,600.0, -300.0,-300.0,-300.0, 0.0,0.0,-1.0);
  stroke(128,0,0);line(0,0,0,300,0,0);
  stroke(0,128,0);line(0,0,0,0,300,0);
  stroke(0,0,128);line(0,0,0,0,0,300);
// draw remotes
  stroke(255);
  l4p5.line(r1.keel()); l4p5.line(r2.keel());
// view beams of each remotes
  lay1 = r1.irViewDir(0);
  lay2 = r2.irViewDir(0);
  stroke(64);
  if (lay1!=null) l4p5.line(lay1.stern(),lay1.at(10000));
  if (lay2!=null) l4p5.line(lay2.stern(),lay2.at(10000));
// now get the crossing point
  noStroke();
  if (lay1!=null&&lay2!=null) {
    Rod cross = lay1.nearest(lay2);
    l4p5.line(cross);
    l4p5.sphere(cross.at(cross.length()/2),8);
  }
// 
}
PGraphics irView(PGraphics bg, Wrj4P5 wii) {
// 2D drawing with ir information from 2 remotes
  bg.beginDraw();
  bg.background(0);
  bg.scale(1,-1);
  bg.translate(0,-height);
  drawIRDot(0, bg, wii.rimokon(0).irLights[0] );
  drawIRDot(1, bg, wii.rimokon(1).irLights[0] );
  bg.endDraw();
  return bg;
}
void drawIRDot(int bx, PGraphics g, Loc ir) {
  color c = color(32+32*(bx),32+32*(1-bx),32);
  g.noFill();g.stroke(c);g.strokeWeight(1);
  g.rect(bx*width/2+5,5,width/2-10,height/2-10);
  if (ir.x<0) return;
  c = color(96+32*(bx),96+32*(1-bx),96);
  g.noStroke();g.fill(c);
  g.ellipse((bx+ir.x)*width/2, ir.y*height/2,8,8);
}

Re: wrj4P5, WiiRemote P5 Library - Alpha
Reply #185 - Feb 28th, 2009, 9:46am
 
Quote:
class Remote extends Ship {
  PImage face;
  WiiRimokon me;
  private Remote() {
   super(new Loc(0,0,0), new Loc(74,0,0), new Loc(0,17,0), new Loc(0,0,14));
  }
  Remote(WiiRimokon me) { 
   super(new Loc(0,0,0), new Loc(74,0,0), new Loc(0,17,0), new Loc(0,0,14));
    this.me = me;
    face = loadImage("6face.jpg");
  }
  Remote(WiiRimokon me, Loc at) { 
    super(at, at.add(74,0,0), at.add(0,17,0), at.add(0,0,14));
    this.me = me;
    face = loadImage("6face.jpg");
  }
  Rod irViewDir(int idx) { // convert ir_coordinates to view direction in the 3D space.
    float rad=4;
    if (idx<0||idx>3||me.irLights[idx].x<0) return null;
    Loc ir = me.irLights[idx];
    Rod dir = new Rod(at(length()-4,0,0),bow());
    dir.rotate(up(),-(ir.x-0.5)/rad*PI);
    dir.rotate(star(),(ir.y-0.5)/rad*PI);
    return dir;
  }
}


Re: wrj4P5, WiiRemote P5 Library - Alpha
Reply #186 - Mar 2nd, 2009, 2:15pm
 
Thank you for the support, Classiclll.

I have upgraded and is now using:

Processing 1.0.3
WiiRemoteJ 1.6
BlueZ 4.3
BlueCove-gpl 2.1.0

There were some upgrades to BlueZ and Blueman for my machine today and I am now able to connect the WiiMote in Blueman. I can connect with no pin code and connect it as an input device. If I turn it off I can also choose to connect in Blueman, press 1+2 on the WiiMote and it connects instantly. Apparently, Bluetooth seems to be working as it should, but still no luck in Processing.

I really appreciate your help, it would be cool if you could also post a sketch of an extremely simple sketch for testing the connection, just to make sure nothing else is disturbing the connection part. If you could make a sketch that works on your machine that does nothing but connect to a WiiMote and reports that it is working, I would be very happy. I'm not sure if my code is up to date or if something has changed from where I grabbed it.

If somebody got it to work on a variant of Ubuntu it would be cool to hear about it too. Smiley
Re: wrj4P5, WiiRemote P5 Library - Alpha
Reply #187 - Mar 2nd, 2009, 5:21pm
 
OK, I will do this test.
I need to buy a another wiimote ( no worries, I was going to anyway ). Do I need something else then wiimotes?  Do I need a IR-Pen?
I can easy build one if I need it for the test ( a pen + a led + a switch + a battery ).
Re: wrj4P5, WiiRemote P5 Library - Alpha
Reply #188 - Mar 4th, 2009, 4:23pm
 
>ALJ
link to my sample sketches are in  
http://processing.org/discourse/yabb_beta/YaBB.cgi?board=Integrate;action=display;num=1234224785

>TM
thanks!
yes you need an irPen, TVremote or candle.
like
http://blogs.yahoo.co.jp/classiclll_jp/52955428.html
Re: wrj4P5, WiiRemote P5 Library - Alpha
Reply #189 - Mar 9th, 2009, 1:36pm
 
Hmm, still not working. If I can help in any way how to resolve this on (x)Ubuntu, let me know. Smiley
Re: wrj4P5, WiiRemote P5 Library - Alpha
Reply #190 - Mar 13th, 2009, 12:59pm
 
My friend is running OSX 10.5.6 on an Intel based and has the exact same issue as me. Same symptoms. DarwiinRemote works fine.
Re: wrj4P5, WiiRemote P5 Library - Alpha
Reply #191 - Mar 15th, 2009, 2:13pm
 
hi ALJ
sorry for a late response.
ALJ wrote on Mar 13th, 2009, 12:59pm:
My friend is running OSX 10.5.6 on an Intel based and has the exact same issue as me. Same symptoms. DarwiinRemote works fine.
my main env. is leopard on ppc, and the author of wiiremotej's is leopard on intel. on both case, the succes probability is highest, and the trouble may be from his bt-dongle.

on your case(linux), i have no experience but the following forum might be help for you.
http://www.wiili.org/forum/wiiremotej-tips-t2815.html

btw, what the text pain says
Re: wrj4P5, WiiRemote P5 Library - Alpha
Reply #192 - Mar 16th, 2009, 1:51am
 
>ALJ

Classiclll wrote on Mar 15th, 2009, 2:13pm:
my main env. is leopard on ppc, and the author of wiiremotej's is leopard on intel. on both case, the succes probability is highest, and the trouble may be from his bt-dongle.

one more thing for your friend.
pls try blucove2.0.3 instead of 2.1.0,
or insert the following code as the first line of setup(){};
Code:
System.setProperty("bluecove.jsr82.psm_minimum_off","true"); 


one of my troubles on ppc lepard has been solved.
Re: wrj4P5, WiiRemote P5 Library - Alpha
Reply #193 - Apr 7th, 2009, 5:40am
 
OK... I had several problems with my setup: Ubuntu 8.10, Processing 1.0.3, Bluez 4, Bluecove 2.1.0 GPL, WiiRemoteJ 1.6, which involved all sorts of problems from the bluetooth library not being found (even though I could 'hcitool scan' on the command line) through to no response from the Wii controller.

First of all, the compatibility problems with Bluecove 2.1.0 and Bluez 4 can be sorted by simply installing libbluetooth-dev:
Code:
sudo aptitude install libbluetooth-dev 


which installs the library file processing looks for (thanks to http://groups.google.com/group/bluecove-developers/browse_thread/thread/a3c7758033eef766).  Now bluetooth initialises correctly in Processing.  Secondly, thanks to Classic's suggestion of entering this line:
Code:
System.setProperty("bluecove.jsr82.psm_minimum_off","true"); 


in setup, the controller connects and everything is working perfectly.  As usual, thanks to Classic for an excellent library and great support.
Re: wrj4P5, WiiRemote P5 Library - Alpha
Reply #194 - Apr 8th, 2009, 4:21am
 
Thanks a lot classic and wayfarer, it all works now! Same setup as wayfarer for me, except I now use Eeebuntu but should be the same. Everything works fine with wayfarers solutions. Will try and test it on my friend's Mac too. Smiley
Pages: 1 ... 11 12 13 14 15 16