Custom code doesn't work when I unplug the Bit from USB

Hi,

I have tried editing and uploading some code with https://code.circuitmess.com/ and everything went well except the fact that I the code runs only if I let the device(Bit) plugged in the computer.
As soon as I unplug the device from the computer the screen goes white and nothing happens.
Same is with all of the example sketches as well as with my own custom sketches.
Restore Stock firmware works fine.

Thanks in advance.

Hi Neeko,

Thanks for the detailed explanation, that helps a lot :+1:

What you’re experiencing is actually expected behavior when using CircuitBlocks (MicroPython). I’ll explain it in a clearer way:

When you upload code through code.circuitmess.com using CircuitBlocks, your code does not get permanently saved to the Bit’s internal memory.

Here’s what happens instead:

The device has the MicroPython interpreter permanently stored in its program memory.

When connected to your computer, your code is temporarily sent to the device and executed.

Once you unplug the device, that temporary code is no longer being supplied — so it stops running.

That’s why:
:heavy_check_mark: It works while plugged in
:x: It stops (white screen) when unplugged
:heavy_check_mark: Stock firmware works fine (because that firmware is permanently flashed to the device)

So nothing is broken, it’s just how MicroPython mode works.