You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: guides/fallctf-2025/badge.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,3 +43,7 @@ To reboot the badge after uploading a file, either
43
43
44
44
- Press the small button on the back left of the badge (next to the battery and the switch).
45
45
- Connect with `mpremote`, then press `Ctrl`+`D`. (If nothing happens, try pressing `Ctrl`+`C` first.)
46
+
47
+
If you are modifying a large file, such as `asteroids_game.py`, the device may complain about being out of memory. To resolve this, compile the file to bytecode using mpy-cross. Run `pip install mpy-cross` to install mpy-cross. Then, compile the file with `mpy-cross asteroids_game.py`. Finally, upload the file to the device with `mpremote cp asteroids_game.mpy :`.
48
+
49
+
Note that micropython python will load files in the following order: `.py` -> `.mpy` -> frozen files. By default, all our code is frozen. To override any module, simply include the .py or .mpy file in the top level directory. If there are both .py and .mpy files, the .py file will be used. The .mpy file uses significantly less memory, as micropython does not need to compile it.
0 commit comments