Processing + Bluetooth + Arduino - Major connection problem! Please help!


This is the same problem I've posted at this topic under the "Networking" forum, however I'm also posting it here due to unknowing the actual origin of this problem. At the other post there is a little more info:,106839.msg801657.html

I'm developing an audiovisual installation, that uses data from a soft circuit (Lilypad+accelerometers+bluetooth mate silver) to generate images and sounds on Processing. More info and codes:

My problem is that everytime the power supply connection of Lilypad (or even the bluetooth itself) fails for any reason, even for a very little time ("blinking" the power), bluetooth simply looses its connection to OSX (and consequentially, to Processing, or even Arduino's software serial port!).

Does anyone knows a workaround for this? Is this occasioned by a misfunctioning of any of my devices, or perhaps a misconfiguration of them? Is it possible to perhaps avoid this on Processing itself?

Thanks a lot!

Hmmm... losing power is never good for an installation. Can you fix your power supply problem? Wouldn't that be the simplest solution?

Yep, that's what I'm currently working at.

However, as interactors are free to interact in whatever form they'd like with the interface, and perhaps by rough manipulation of it the problem would appear... so I really need to be more secure regarding this. Everything else I'm doing the best I can to prevent any problem.