problems with sparki's bluetooth module


Hi. I’m having problems with the bluetooth modules.

I can communicate with it sometimes sending and receiving messages successfully to and from my mac.

and even so it usually hangs then restarts in after I send a command to it (status led blinks red) and the Sparki logo disappears before showing up again.

This is my code:

but sometimes I get this error as well:

I hope someone can help me, thanks!