While the BBC micro:bit has hardware capable of allowing the device to work as a Bluetooth Low Energy (BLE) device, it only has 16k of RAM. The BLE stack alone takes up 12k RAM which means there’s not enough memory for MicroPython to support Bluetooth on a micro:bit V1.
虽然 BBC micro:bit 具有能够让设备作为低功耗蓝牙(BLE)设备的硬件,但它只有 16k 的 RAM。仅 BLE 堆栈就占用 12k RAM,这意味着 MicroPython 没有足够的内存来支持 micro:bit V1 上的蓝牙。
Note 注意
MicroPython uses the radio hardware with the radio module. This allows users to create simple yet effective wireless networks of micro:bit devices.
MicroPython 将 radio 硬件与 radio 模块一起使用。这允许用户创建简单而有效的 micro:bit 设备无线网络。
Furthermore, the protocol used in the radio module is a lot simpler than BLE, making it far easier to use in an educational context.
此外, 无线电模块中使用的协议比 BLE 简单得多,因此在教育环境中更易于使用。
The nRF52833 used by the micro:bit V2 has 128k of RAM, allowing Micropython to make use of the BLE stack. Currently the only implemented feature is BLE flashing, allowing a user to update the firmware on the micro:bit over Bluetooth.
micro:bit V2 使用的 nRF52833 具有 128k 的 RAM,允许 Micropython 使用 BLE 堆栈。目前唯一实现的功能是 BLE 闪烁,允许用户通过蓝牙更新 micro:bit 上的固件。
At the time that this was written the Nordic DFU service is implemented, and partial flashing is currently working but in beta. The Nordic DFU service updates everything in flash and will take a (relatively) long time to complete, whereas the partial flashing service only updates the filesystem containing the user scripts.
在编写本文时,Nordic DFU 服务已实现,部分刷写目前有效,但处于测试阶段。Nordic DFU 服务会更新 flash 中的所有内容,并且需要(相对)很长时间才能完成,而部分 flashing 服务仅更新包含用户脚本的文件系统。