Skip to main content
Archived

This project has been archived by its maintainers, and is no longer receiving any updates.

A community fork of uFlash.

A utility for flashing the BBC micro:bit with Python scripts and the MicroPython runtime. You pronounce the name of this utility “micro-flash”. ;-)

It provides three services:

  1. A library of functions to programatically create a hex file and flash it onto a BBC micro:bit.

  2. A command line utility called uflash/py2hex that will flash Python scripts onto a BBC micro:bit.

  3. A command line utility called uextract/hex2py that will extract Python scripts from a hex file created by uFlash.

Several essential operations are implemented:

  • Encode Python into the hex format.

  • Embed the resulting hexified Python into the MicroPython runtime hex.

  • Extract an encoded Python script from a MicroPython hex file.

  • Discover the connected micro:bit.

  • Copy the resulting hex onto the micro:bit, thus flashing the device.

  • Specify the MicroPython runtime hex in which to embed your Python code.

You can generate or download fully optimized MicroPython runtime hex for micro:bit v2 through micropython-microbit-v2-builder.

Installation

To install simply type:

$ pip install uflash3

NB: You must use a USB data cable to connect the micro:bit to your computer (some cables are power only). You’re in good shape if, when plugged in, the micro:bit appears as a USB storage device on your file system.

Linux users: For uflash to work you must ensure the micro:bit is mounted as a USB storage device. Usually this is done automatically. If not you’ve probably configured automounting to be off. If that’s the case, we assume you have the technical knowledge to mount the device yourself or to install the required kernel modules if they’re missing. Default installs of popular Linux distros “should just work” (tm) out of the box given a default install.

Metadata

Release files for uflash3 3.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for uflash3 3.0.4
File Size Uploaded
uflash3-3.0.4.tar.gz 1.5 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for uflash3 3.0.4
File Interpreter ABI Platform
uflash3-3.0.4-py3-none-any.whl Python 3 none any Details

Total release size: 3.1 MB

Release files / uflash3-3.0.4.tar.gz

Download URL uflash3-3.0.4.tar.gz
Size 1.5 MB
Tags Source
SHA-256 checksum
How to use checksums
629a0c82021905aac4cc7e8e5d75daec931d4f4d42842d134df22489e458094b
BLAKE2b-256 checksum
How to use checksums
8dd39286fc422c47785726fccd66138f24c6ecbe55ba5072997ed340f1cfb54b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / uflash3-3.0.4-py3-none-any.whl

Download URL uflash3-3.0.4-py3-none-any.whl
Size 1.5 MB
Tags Python 3
SHA-256 checksum
How to use checksums
1f26809709fd1e043fd5c30ae9230b35dd9c7b12c1ce9a735c218e173ec5e5ff
BLAKE2b-256 checksum
How to use checksums
2cfe91de3ca5a404f7c5b8da80a3c919c8fa249da9abb562a3ea950fec7c1c38
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page