« Return to Thread: WiiMote example code request

Re: WiiMote example code request

by nescivi :: Rate this Message:

Reply to Author | View in Thread

On Saturday 17 May 2008 09:27:33 Stephan Wittwer wrote:

> Am 16.05.2008 um 11:03 schrieb nescivi:
> > WiiMote.start;    // start the eventloop
> > WiiMote.discover; // discover a new device (wait for post about
> > connected)
>
> I tried this several times, with no luck (Dual G5 Mac, 10.5.2).
>
> Post window says:
>
> ///
> WII: searching wiimote 1
> device added
> [ a WiiMote ]
> WARNING:
> WiiMote disconnected!
> ///
>
> This non-functional instance of WiiMote is in WiiMote.all now.

however, if you wait a bit longer, the WiiMote may still get connected.
Bluetooth connection setup takes some time, and it is an asynchronous
process, so it is possible that setup is still running, while the device is
being checked whether or not it is connected and gets disconnected.

> If one tries WiiMote.discover again, without doing closeAll before,
> it's possible to populate the array with many more instances, all of
> them pointing to the same hardware device. Why?

the underlying code doesn't seem able to detect correctly that a device wasn't
opened properly.
It's been a while since I wrote the code, so I don't recall exactly without
delving into it again.

> Pete Moss's WiimoteLib UGens are working fine here, as are
> DarwiinRemote.app and OSCulator.app
> (glad they exist since I have the WiiMote device only since yesterday
> and first thought it was broken).
>
> May I ask this question:
> Is WiiMote from SCClassLibray working at all for anybody (on a Mac) ?

It works somewhat, but not perfect.
There is still a known bug that it crashes after a while (at least on one Mac
I tried), and it is a known issue as stated in the helpfile that sometimes
the connection is not set up correctly.

I haven't had any time to look (if anyone has an idea on how to make days
longer...) into fixing these problems, though I recall that Pete offered to
help iron it out, using the lib he is using instead of the adapted
aka.wiiremote code that is used now.

BTW, on Linux it is working flawlessly, thanks to there being available a lib
with a clean callback api, which was much more easy to interface with.

Unfortunately, crossplatform libs are still in early stages, AFAIK...

sincerely,
Marije
_______________________________________________
sc-users mailing list
sc-users@...
http://lists.create.ucsb.edu/mailman/listinfo/sc-users

 « Return to Thread: WiiMote example code request