v4.0.0¶
v4.0.0 is the major v3 → v4 release. It introduces the modern multi-frame
sensor buffering API (double / triple buffering and a video FIFO), a frame
complete callback, a Bluetooth module (NimBLE stack) with Portenta
support, the initial MT9M114 camera driver, MDMA-offloaded camera capture,
Bayer/JPEG support in image.draw_image(), and a jump to MicroPython
1.15. The legacy streaming mode was removed and sensor.set_windowing()
was reworked — read the breaking changes below.
Highlights¶
Multi-frame buffering —
sensorgains double buffering, triple buffering, and a video-FIFO mode for higher, smoother frame rates.Frame complete callback — register a callback that fires when a new frame is ready, for non-blocking capture pipelines.
Bluetooth — a
bluetoothmodule built on the NimBLE stack, enabled on the Arduino Portenta H7 (with a BLE example).MT9M114 — initial camera sensor driver.
Faster capture — MDMA offload for camera data capture;
draw_image()now accepts Bayer and JPEG sources/destinations.MicroPython 1.15 — the bundled MicroPython was updated from 1.13 to 1.15.
Breaking: the legacy streaming mode was removed and
sensor.set_windowing()was reworked — see the breaking changes.
New features¶
Sensor multi-buffering — added
sensor.set_framebuffers()/sensor.get_framebuffers()and theSINGLE_BUFFER/DOUBLE_BUFFER/TRIPLE_BUFFER/VIDEO_FIFOmodes, plussensor.get_frame_available()for double, triple, and video-FIFO capture.Frame complete callback — added
sensor.set_frame_callback()so a Python callback runs when each new frame finishes.Bluetooth — added a
bluetoothmodule backed by the NimBLE stack (NimBLE submodule, CYW-BT driver), enabled on the Arduino Portenta H7 with a BLE example.MT9M114 — added the initial MT9M114 camera sensor driver.
draw_image — added debayering support and JPEG copy support so
image.draw_image()accepts Bayer and JPEG source/destination images.MDMA capture offload — camera data capture is offloaded to MDMA for higher throughput.
A color-palette argument can now be disabled by passing
-1(sinceNoneis reserved as a valid argument).
Other changes and improvements¶
Switched to the new software I2C implementation; aligned with MicroPython upstream; per-board ulab configuration; basic built-in modules enabled for OpenMV 2; fairer frame-buffer readout locking; mutex support extended to Cortex-M0/M0+ with a lock timeout.
Bug fixes¶
Camera and imaging:
Fixed FLIR Lepton init reliability on the Pure Thermal board, ImageIO JPEG buffer / pause handling, HM01B0 vflip/hmirror settings, the JPEG buffer flush when an image is invalidated, and a
croppedflag that was set when the framesize was invalid.
System and connectivity:
Fixed the USB command draining and the reset-to-bootloader command, mutex init, the UART clock source, the FatFS code-page define, WINC1500 out-of-band ACK handling, WiFi debugging, and the Nano33 USB PID; isolated dedicated analog pads.
Hardware and board support¶
MT9M114 camera sensor (initial driver).
Arduino Portenta H7 — Bluetooth enabled (NimBLE) with a BLE example.
Arduino Nano RP2040 Connect / Nano 33 BLE Sense — WiFi-debug flag disabled where unsupported; blinky example added; USB PID fix.
Breaking API changes¶
User-visible API breaks between v3.9.4 and v4.0.0. Scope: Python C-modules in
modules/ and Python libraries in scripts/libraries/.
Each change is tagged with its impact:
major — affects most scripts; you will almost certainly need to port code.
minor — narrow API; only affects scripts that used it.
behavior — same API, different results; re-check tuned scripts.
Changes are grouped by impact in that order. If you just want to port your code, jump to the migration checklist at the end. Each commit hash links to its diff on GitHub.
Streaming mode removed (major)¶
The legacy sensor streaming mode was removed in favor of the new multi-frame
buffering API. Code that enabled streaming mode must switch to
sensor.set_framebuffers() with DOUBLE_BUFFER / TRIPLE_BUFFER /
VIDEO_FIFO and drive capture with sensor.snapshot() /
sensor.get_frame_available() instead.
Commits: a42f3a647
sensor.set_windowing() reworked (behavior)¶
sensor.set_windowing() was made much more flexible: it now accepts
multiple argument forms (a region tuple, or width/height centered, or
x, y, w, h) and resolves the window relative to the current resolution.
Scripts that passed windowing arguments in the old fixed form may select a
different region and should be re-checked.
Commits: 3e9c43554
MicroPython 1.13 → 1.15 (behavior)¶
The bundled MicroPython core was updated from 1.13 to 1.15 (via 1.14).
Standard-library and language behavior follows upstream MicroPython 1.15;
re-check scripts that depend on version-specific micropython / standard
module behavior.
ImageIO update_jpeg_buffer argument removed (minor)¶
The ImageIO JPEG-buffer update was reworked to derive the buffer from the
image source argument, and the explicit update_jpeg_buffer argument was
removed. Scripts that passed update_jpeg_buffer to ImageIO must drop that
argument.
Commits: 5c6937bd1
Migration checklist¶
For a clean port to v4.0.0 the typical work is:
Replace any use of the removed streaming mode with the new
sensor.set_framebuffers()multi-buffering API (streaming mode removed).Re-check
sensor.set_windowing()calls against the reworked, more flexible argument handling (the windowing change).Re-validate scripts that depend on version-specific MicroPython behavior against MicroPython 1.15 (the MicroPython bump).
Drop the
update_jpeg_bufferargument from ImageIO calls (the ImageIO change).
All other scripts run unchanged.