v4.5.0

v4.5.0 is a major release. The old lcd module was replaced by a unified display module with separate SPI / parallel / DSI / TV backends, the Arduino Giga board was added, and a wave of display, touch, and sensor-control features arrived. There are several breaking changes — read them below.

Highlights

  • New display module — replaces lcd with unified SPIDisplay / RGBDisplay / DSIDisplay / TVDisplay backends.

  • Arduino Giga board support.

  • New display/touch hardware — DSI displays on STM32 H7, TFP410 DVI/HDMI, HDMI/DVI CEC, ST7701 RGB panels, and GT911 / FT5X06 capacitive touch.

  • New sensor controls — black-level calibration, night mode, and sensor.disable_delays(); much faster transpose (~5x) and morphology (~2.5x).

  • Breaking: lcddisplay, lcd_touchft5x06, renamed LED pins — see the breaking changes.

New features

  • Display backendsDisplayData (DDC/EDID readout), a TFP410 DVI/HDMI serializer, MIPI-DSI display support on STM32 H7, an HDMI/DVI cec driver, and a Python display library with an ST7701 RGB panel init helper.

  • Touch — new GT911 5-point capacitive touch driver (read_points() / read_id() / reset()).

  • machine extension — a freezable machine library with a machine.LED helper class, and a new machine.LED.value([v]) method.

  • Sensor controlssensor.set_auto_blc(enable, regs=None) / sensor.get_blc_regs() (black-level calibration), IOCTL_SET_NIGHT_MODE / IOCTL_GET_NIGHT_MODE (OV7725/OV5640), OV7670 hmirror/vflip, and sensor.disable_delays() to skip camera settling delays for faster reconfiguration.

  • i.MX RTsensor.set_xclk_frequency() now accepts any frequency (snapping to the nearest valid CSI divider) and the SPI lcd / tv / fir modules were enabled on the RT1060.

Other changes and improvements

  • Much faster image ops — image transpose is ~5x faster and image.morph() is ~2.5x faster.

  • The camera-bus probe now scans and validates multiple device addresses, supporting boards with several devices on the bus.

Bug fixes

Camera and sensors:

  • Fixed gain-calculation accuracy across many sensors (HM01B0, HM0360, MT9M114, MT9V0xx, OV2640, OV5640, OV7690, OV7725, OV9650, PAJ6100), MT9V0xx exposure / column-binning, OV5640 exposure, and OV7670 VGA windowing.

  • STM32 now drops corrupted transpose frames instead of returning bad images.

Image processing:

  • Fixed an integer overflow affecting image / FIR / ToF / LCD / TV operations, invalid vcvtm/vcvtp floating-point instructions on Cortex-M4 (fast_floorf/fast_ceilf), an in-place scaling bug in image.to_*() conversion, and DMA2D draw cache corruption.

Display and system:

  • Fixed DSI display timing and portrait mode, micro_speech listen() on Nicla Vision / Portenta H7, the STM32 user switch (pyb.Switch), and I2C4 bus support.

Hardware and board support

  • Arduino Giga — new board, with named Arduino pin mappings and a full example set.

  • OpenMV RT1060 — SPI LCD, TV, and FIR thermal modules enabled.

  • Arduino Nano 33 BLE Sense — LED pins.

Breaking API changes

User-visible API breaks between v4.4.3 and v4.5.0. Scope: Python C-modules in modules/ and Python libraries in scripts/libraries/.

Each change is tagged with its impact:

  • major — most scripts that used it need edits.

  • 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.

lcd module replaced by display (major)

The old lcd module was removed and replaced by a unified display module split into SPIDisplay (SPI LCD shield), RGBDisplay / parallel, DSIDisplay (MIPI-DSI), and TVDisplay backends with a common API. Scripts must switch from import lcd to the display module and construct the appropriate backend object.

Commits: 227824aac, 6c6336829

Touch module, LED pins, and bundled drivers (minor)

The generic lcd_touch module was replaced by a dedicated FT5X06 capacitive-touch driver module. LED pin names were renamed for consistency across all boards (scripts referencing the old LED pin names must update). The bundled hts221 / lps22h / lsm6dsox / lsm9ds1 IMU/sensor drivers were replaced with the upstream micropython-lib versions, whose APIs differ slightly (the bundled examples were updated to match).

Commits: 86ad6dcdb, 9344c3b74, 2b5b7963b

Unsupported sensor controls now warn (behavior)

sensor.set_auto_gain(), set_auto_exposure(), set_auto_whitebal() and set_auto_blc() now print a warning instead of raising a RuntimeError when the active sensor does not support the control, so the same script can run across sensors with differing capabilities. Code that relied on catching the exception must be updated.

Commit: dbf4996f2

Migration checklist

For a clean port to v4.5.0 the typical work is:

  1. Replace import lcd usage with the new display module and the appropriate backend (the display module change).

  2. Switch lcd_touch to FT5X06, update any old LED pin names, and re-check the upstream IMU driver APIs (the touch/pin/driver changes).

  3. Replace try/except RuntimeError around unsupported sensor controls with capability checks (the sensor-control change).