Gettin’ technical

8 Nov

Today in uni, I had the fun task of trying to get a wiimote working with flash on a mac. Theres a problem there. Wiimotes dont connect very well to macs if you are using WiiFlash, the usual port of call for anyone who wants to hook up a wiimote and get it working in flash.

After two days of failed attempts at getting it working, myself and adam set upon the task of writing up code that grabs information from the far more reliable program, osculator.

Osculator is a peice of software that makes connecting various devices ranging from iphones to wacom tablets and then taking their input data and putting it out into midi software. You can also read out the raw values into various other programs, including flash if you have the right class files.

Me and Adam found a nice AS3 class that handles the needed event listeners for osculator and then how to bridge the two together. We then set about writing our own code that handles the input data from the wiimote. It works really well. It’s also super reliable and connects instantly.

So what I did tonight, was put all this complicated code into a really nice class wrapper. This way, whenever I want to call up a value for the x or y axis of the wiimote or a brainwave value, I just need one line of code.

Technically two, one to setup and initialise the class sheet and one to call out the value. All the rest of the calculations and connections are done behind the scenes in some class files I created to handle these things.

It feels really good to do this sort of flash coding, creating my own class files for easy and clean access of code, writing my own code to handle the aquisition of raw values from a physical input and then the calculations to make them more usable. It’s really cool.

I might put up the class files as a download later on when they are a bit more polished and ready for adjustments. I think people could really benefit from my osculator class, makes wiimote control in flash really simple and reliable on a mac.

All the code you will ever need to read brainwaves or wiimote IR in flash


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: