Python

Python Editor and MicroPython information

Storing and retrieving values in non volatile data
The MicroPython language has a feature that allows you to read, write, and delete files. You can have multiple files and the Mu editor allows you to access...
Tue, 10 Apr, 2018 at 3:21 PM
How to use an updated MicroPython image
QUESTION How do I use a more recent MicroPython image to generate my scripts? I have a patched .hex image how do I use this to load Python onto the mic...
Sat, 25 Feb, 2017 at 9:26 AM
Build a new Image() from a buffer
Code to useIf you want to display an image from a pre-prepared buffer. from microbit import * i = Image(5,5,b'\x08\x08\x08\x08\x08\x08\x08\x08\x08...
Thu, 5 Jul, 2018 at 2:27 PM
Receiving radio data from the Makecode editor within Python
The Makecode editor radio blocks add some additional binary information at the start of the radio message. When received by Python, this binary data can cau...
Thu, 1 Oct, 2020 at 2:32 PM
Why do I get a MemoryError when using Micropython
Memory errors There are two memory or RAM issues that you might encounter:    When your script is being converted from it's Python source into r...
Thu, 20 Feb, 2020 at 1:56 PM
Program is interrupted when using UART
Problem When redirecting the UART service to pins, it doesn't turn off the CTRL-C handling, so receiving a binary 0x03 from the device at the other en...
Wed, 13 Dec, 2017 at 3:52 PM
How to find the micro:bit serial number
The micro:bit has a register mapped into it's memory called the FICR (Factory Information Configuration Register) that stores information programmed in...
Fri, 5 Mar, 2021 at 3:03 PM
What is the difference between 'import microbit' and 'from microbit import *'
These are both valid examples of Python syntax and effectively doing the same thing in a slightly different way. import microbit imports the entire modu...
Tue, 2 Apr, 2019 at 3:26 PM
Playing audio on the micro:bit
It is possible to play back audio from sound files available to the micro:bit. Add the files attached to this article to the Python Editor filesystem. Copy ...
Tue, 30 Mar, 2021 at 8:22 AM