mirror of
https://github.com/alankrantas/microbit-micropython-cookbook.git
synced 2026-01-04 19:31:22 +01:00
Update README.md
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
[BBC micro:bit MicroPython documentation](https://microbit-micropython.readthedocs.io/en/latest/index.html#)
|
[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
|
## Easer Eggs
|
||||||
|
|
||||||
@@ -27,9 +27,11 @@ love.badaboom()
|
|||||||
|
|
||||||
## Some Lesser Known Facts
|
## 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/).
|
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/).
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user