I... keep writing to Bluetooth (Bluetooth.println())
That really shouldn't be a major issue. It detects if there's no connection and just throws the data away immediately.
When it 'craps out', what happens? Does it lock up, does all the code get removed?
If at all possible, I'd either leave a PC connected via bluetooth so you can see any log messages, or wire up a USB-TTL converter so you can see your log messages when not connected via Bluetooth. It might give you some idea if something is printed before it dies.
There are other things you can do (writing log messages to flash), but if you can avoid that it'd be better as there's always a chance it'll die so badly it doesn't get a chance to write the data away.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
That really shouldn't be a major issue. It detects if there's no connection and just throws the data away immediately.
When it 'craps out', what happens? Does it lock up, does all the code get removed?
If at all possible, I'd either leave a PC connected via bluetooth so you can see any log messages, or wire up a USB-TTL converter so you can see your log messages when not connected via Bluetooth. It might give you some idea if something is printed before it dies.
There are other things you can do (writing log messages to flash), but if you can avoid that it'd be better as there's always a chance it'll die so badly it doesn't get a chance to write the data away.