All articles

Why doesn’t the program I wrote in CircuitBlocks stay on the device after a reset?Updated 5 hours ago

This happens because of how the coding environment interacts with your hardware. Before you can use CircuitBlocks, your device needs to be equipped with MicroPython. MicroPython is a specialized Python interpreter for microcontrollers that acts as a live terminal.

When you create a program in CircuitBlocks and click run, the code is sent via USB and begins executing immediately on the device. However, this code is running in the device's active memory. If the device is reset by pressing the reset button or by turning it off and on again, the program is cleared from that temporary memory.

The MicroPython system on the device is designed to wait for the next command and does not automatically store the entire program on the device's permanent storage. This allows for a very fast and interactive "tinkering" experience, but it does mean that if you want to run your code again after a power cycle, you simply need to hit the run button in CircuitBlocks once more!

Was this article helpful?
Yes
No