Update README.md

This commit is contained in:
Alan Wang
2020-04-03 17:35:55 +08:00
committed by GitHub
parent d6dbf9e7d5
commit 0dad56d0d6

View File

@@ -4,7 +4,7 @@
[BBC micro:bit MicroPython documentation](https://microbit-micropython.readthedocs.io/en/latest/index.html#)
This is my notes, tricks and experiments for BBC micro:bit with MicroPython.
This is my notes, tricks and experiments about BBC micro:bit and MicroPython.
## Easer Eggs
@@ -27,9 +27,11 @@ love.badaboom()
## Some Lesser Known Facts
Since both Python and MicroPython are interpreted languages, they eat a lot of memory. Also, the hex file generated by micro:bit Python editors are consisted of 2 parts: the MicroPython firmware (up to 248 KB) and user's script (up to only 8 KB). See [Firmware Hex File](https://microbit-micropython.readthedocs.io/en/latest/devguide/hexformat.html). Which means it's not possible to build big projects with micro:bit's MicroPython.
Since both Python and MicroPython are interpreted languages, they eat a lot of memory. Also, the hex file generated by micro:bit Python editors are consisted of 2 parts: the MicroPython firmware (up to 248 KB) and user's script (up to only 8 KB). See [Firmware Hex File](https://microbit-micropython.readthedocs.io/en/latest/devguide/hexformat.html). Which means it's less likely to build bigger projects with micro:bit's MicroPython.
One way to "minimize" your script size is to use one-space indents instead of 4.
One way to "minimize" your script size is to use 1-space indents instead of 4.
micro:bit's MicroPython is based on Python 3.4. Which means many built-in Python advanced feaetures, like string.format(), list comprehension, list slice, variable unpacking, lambda function, decorators, generators, @classmethod, @staticmethod, etc. can be used as well.
Also, about how micro:bit get its own version of MicroPython: [The Story of MicroPython on the BBC micro:bit](http://ntoll.org/article/story-micropython-on-microbit) by Nicholas H. Tollervey, who also created the [Mu editor](https://codewith.mu/).