Skip to content

Releases: pybricks/pybricks-micropython

4.0.0b2

25 Nov 09:02

Choose a tag to compare

4.0.0b2 Pre-release
Pre-release

Fixed

  • Enable CI releases for v4.x.

4.0.0b1 (no release with this version because of CI issue)

Added

  • Experimental support for USB connectivity on SPIKE Prime (pybricks-micropython#208). Currently disabled by default.
  • Initial support for pybricks.iodevices.UARTDevice (support#220).
  • Enabled previously hidden support for multiple code
    slots (pybricks-micropython#264, pybricks-micropython#312).
  • Added the following status flags to the Pybricks protocol:
    • PBIO_PYBRICKS_STATUS_BATTERY_HIGH_TEMP_SHUTDOWN = 10
    • PBIO_PYBRICKS_STATUS_BATTERY_HIGH_TEMP_WARNING = 11
    • PBIO_PYBRICKS_STATUS_USB_HOST_CONNECTED = 12
  • New embedded firmware for LEGO MINDSTORMS EV3:
    • Fast boot on TI AM1808.
    • New clock driver.
    • New display driver.
    • New SPI storage driver.
    • New USB controller.
    • New motor driver.
    • New UART driver with hardware and PRU support.
    • New PRU firmware for LED PWM control.
    • New GPIO driver.
    • New ADC driver.
    • New DCM driver for EV3 auto-detection.
  • Enabled the original pybricks.ev3devices to run on the new embedded EV3 port:
    • Color Sensor.
    • Touch Sensor.
    • Infrared Sensor and Beacon.
    • Gyro Sensor in angle + rate mode, with calibration option.
    • Ultrasonic Sensor.
    • Large and Medium Motor.
  • Enabled the original pybricks.nxtdevices to run on the new embedded EV3 port:
    • Touch Sensor, including 1.0 version without auto-detection.
    • Color Sensor, with background process for background light cancellation.
    • Light Sensor, with background process for background light cancellation.
    • Ultrasonic Sensor, including I2C quirks for LEGO Devices.
    • Sound Sensor.
    • Temperature Sensor in I2C mode.
    • Energy Meter.
    • vernier Adapter.
  • Enabled all original pybricks.iodevices, all async-compatible:
    • PUPDevice / LUMPDevice on Powered Up and EV3.
    • AnalogSensor on EV3.
    • I2CDevice on EV3.
    • UARTDevice on EV3 and Powered Up. Added ability to reset protocol.
    • DCMotor on EV3
  • Added new pbio/image module for image frame handling and display support.
  • Added a new Virtual Hub to simulate the embedded Pybricks ports.

Changed

  • Extensive overhaul of UART drivers on all hubs. This affects all
    official LEGO UART sensors on all hubs.
  • Extensive overhaul of the pbio/port module. LEGO mode can now be disabled
    to enable direct access to UART or I2C or ADC on compatible platforms.
  • Extensive overhaul of MicroPython async drivers to make it work across
    Bluetooth drivers.
  • Extensive overhaul of Bluetooth drivers to split out common code and make
    async code more stable and safely cancellable.
  • Overhaul of Bluetooth and USB events through a unified pbio/sys/host interface.
  • LWP3Device.read() now gives buffered notification values instead of blocking
    until a value arrives.
  • Replaced Contiki runloop with new Pybricks protothreads.
  • Enabled flto for smaller firmware build size.
  • Upgraded to MicroPython 1.26. The MPY minor version has changed to v6.3.
    This only affects people using native code in their user programs.
  • Update NXT build to follow along with EV3 wherever possible.
  • Unified mphalport and micropython.c interface for all hubs.
  • Improved power-off sequence to better handle sensors turning off and internal
    devices like the IMU turning off.
  • Restored line numbers in error messages on Move Hub
  • Enabled CSUPEROPT on Move Hub and Technic Hub to reduce build size at a
    slight reduction in VM speed.

Fixed

  • Reduced hanging when broadcasting and observing at the same time with Technic
    Hub (support#2206).
  • Fixed hub shutting down immediately after disconnecting Bluetooth when
    no program had run for a while.
  • Fixed some error messages not printing on a new line if a program ends.
  • Fix speaker when playing a frequency of 0.
  • pybricks.tools: Fix crash when cross() args are wrong type.

Removed

  • Removed support for Pybricks on ev3dev. The official 2.0 release remains
    available for anyone who needs Pybricks on Debian Linux.
  • Removed the experimental build of Pybricks on EV3RT. This is no longer needed
    now that the embedded build is ready.
  • Removed unix-variant of the Virtual Hub. This has been replaced with a simulated
    embedded hub.

3.6.1

11 Mar 13:34

Choose a tag to compare

Fixed

  • Fixed overflow in saturation and value for ambient color measurement. This
    can occur with very bright screens (pybricks-micropython#295).
  • Fixed drive base stall condition not being raised if the right motor is
    individually controlled and then stalled (pybricks-micropython#294).

3.6.0

02 Mar 10:26

Choose a tag to compare

Changed

  • Bump version from beta to 3.6.0 without additional changes.

3.6.0b5

26 Feb 11:30

Choose a tag to compare

3.6.0b5 Pre-release
Pre-release

Changed

  • Changed order of the DriveBase.arc method parameters. This method has not
    yet been released or documented, so this is not a breaking change (support#1157).
  • Reduced voltage threshold at which the charging light goes from red to green
    to indicate that the battery is full from 8300 to 8190 mV ([pybricks-micropython#292]).
  • Simplified API for hub.imu.up() and hub.imu.tilt() to only use a single
    calibrated keyword argument instead of separate use_gyro options. This
    had not been released yet so is not a breaking change.

3.6.0b4

14 Feb 13:28

Choose a tag to compare

3.6.0b4 Pre-release
Pre-release

Fixed

  • Fixed low-battery warning on boot (pybricks-micropython#292) when the
    voltage is not actually low.
  • Fixed light indicator always briefly showing green when just plugged in
    or after rebooting (pybricks-micropython#292) even if battery is not
    actually full.

3.6.0b3

14 Feb 09:11

Choose a tag to compare

3.6.0b3 Pre-release
Pre-release

Added

  • Added optional calibrated=True parameter to acceleration() and up() and
    angular_velocity() and rotation methods of the IMU (support#943).
  • Implemented hub.imu.orientation() to give the rotation matrix of the hub or
    robot with respect to the inertial frame.
  • Added calibration parameters that can be set for angular velocity offset and
    scale and acceleration offset and scale.
  • Added hub.system.reset_storage to restore storage and settings to default
    state.

Changed

  • Enabled UTF-8 support for str objects.
  • The method DriveBase.angle() now returns a float (support#1844). This
    makes it properly equivalent to hub.imu.heading.
  • Re-implemented tilt using the gyro data by default. Pure accelerometer tilt
    can still be obtained with hub.imu.tilt(use_gyro=False).
  • Re-implemented hub.imu.heading() to use optionally use the projection of 3D
    orientation to improve performance when the hub is lifted off the ground.
    The 1D-based heading remains the default for now.
  • Change return value of connected() property from bool to int using the value
    of pbdrv_usb_get_bcd(). This will allow pro users to be able to tell if they
    have a "nonstandard" charger that could prevent proper
    charging (pybricks-micropython#274).
  • When the Bluetooth button is selected to stop the program, don't disable the
    stop button while the hub menu is active (support#1975).

Fixed

  • Fixed battery charging timeout if it didn't reach 100% after about 6 hours.
    This is same behavior observed in official firmware. (pybricks-micropython#292).
  • Fixed inconsistent battery level reported to user. Now it uses the same value
    as used by the light indicator (support#2055).
  • Fixed DriveBase.angle() getting an incorrectly rounded gyro value, which
    could cause turn(360) to be off by a degree (support#1844).
  • Fixed hub silently ignoring non-orthogonal base axis when it should raise.
  • Fixed not handling negative duration in Speaker.beep() (support#1996).

Removed

  • Removed ev3dev and ev3rt-based CI builds. Pybricks 2.0 on ev3dev will
    continue to be available as a separate download.

3.6.0b2

15 Oct 11:27

Choose a tag to compare

3.6.0b2 Pre-release
Pre-release

Added

  • Allow color objects to be iterated as h, s, v = color_object or indexed
    as color_object[0]. This allows access to these properties in block
    coding (support#1661).
  • Added observe_enable to the hub BLE class to selectively turn observing
    on and off, just like you can with broadcasting (support#1806).
  • Added hub.system.info() method with hub status flags (support#1496) and
    value representing how the program was started.

Changed

  • Relaxed speed limit from 1000 deg/s to 1200 deg/s for external Boost
    motor (support#1623).
  • Make broadcast_channel optional instead of defaulting to 0.

Fixed

  • Fixed persistent data not being deleted when swapping
    from 3.6.0b1 to 3.5.0 and back to 3.6.0b1 (support#1846).
  • Fixed controls stopping if use_gyro is called again with the same
    argument as already active (support#1858).
  • Fixed lockup and reboot with f-strings and slice allocations in tight
    loops (support#1668).
  • Fixed program restarting if the stop button was held to end the program
    without an exception (support#1863).
  • Fixed program lockup when restarting a hub light or light matrix animation
    at exact multiples of its animation interval (support#1295).

3.6.0b1

24 Sep 14:17

Choose a tag to compare

3.6.0b1 Pre-release
Pre-release

Added

  • Allow Bluetooth to be toggled off and on with the Bluetooth button on the
    Prime Hub and the Inventor Hub (support#1615), and have this state persist
    between reboots.
  • Added heading_correction to hub.imu.settings to allow for automatic
    correction of the hub.imu.heading() value (support#1678).
  • Added update_heading_correction to interactively set the heading
    correction value (support#1678).
  • Added optional one byte program identifier to program start command.
    For now, this is added to start various builtin
    programs, but it prepares for the ability to start different downloaded
    programs too (pybricks-micropython#254).
  • Added one byte program identifier to the hub status report to the host.
  • Added interface and implementation for storing and selecting multiple code
    slots on the Prime Hub and Inventor Hub.
  • Added ability to set distance and angle in DriveBase.reset(). If the
    DriveBase is using the gyro, it will be set to the same angle. (support#1617).
  • Added DriveBase.arc method with more intuitive parameters to drive along
    an arc, to eventually replace DriveBase.curve (support#1157).

Changed

  • Changed protocol to Pybricks Profile v1.4.0.
  • When upgrading the firmware to a new version, the user program will now
    be erased. This avoids issues with incompatible program files (support#1622).
  • The angular_velocity_threshold, and acceleration_threshold settings
    in hub.imu.settings are now persistent between reboots.
  • Reduced hub poweroff time from 3 to 2 second to make it easier to turn off
    the hub (pybricks-micropython#250).
  • Improved font for the digits 0--9 when displaying them
    with hub.display.char(str(x)) (pybricks-micropython#253).
  • On SPIKE Prime Hub and Robot Inventor Hub, moved Bluetooth indications to
    the Bluetooth light. Only warning lights will be shown on the main button
    light. See (support#1716) and (pybricks-micropython#261).
  • Allow gyro calibration only while all motors are coasting (support#1840) to
    prevent recalibration during very steady moves (support#1687)
  • Reduced default angular velocity stationary threshold from an undocumented
    5 deg/s to 3 deg/s to reduce unwanted calibration while moving (support#1105).
  • If imu.reset_heading() is called while a drive base is actively using the
    gyro, an exception will be raised (support#1818).

Fixed

  • Fixed not able to connect to new Technic Move hub with LWP3Device().
  • Removed gc_collect() from tools.run_task() loop to fix unwanted delays.
  • Fixed await wait(0) never yielding, so parallel tasks could lock up (support#1429).

Removed

  • Removed loop_time argument to pybricks.tools.run_task as this wasn't
    having the desired effect, and would cause loop round trips to take 10 ms
    for every await wait(1) (support#1460). This was an undocumented feature.

3.5.0

11 Apr 12:23

Choose a tag to compare

Changed

  • Bump version from release candidate to 3.5.0 without additional changes.

3.5.0b2

05 Apr 08:34

Choose a tag to compare

3.5.0b2 Pre-release
Pre-release

Added

  • Added optional keyword arguments to pybricks.tools.read_input_byte() for
    automatic conversion via chr and to skip to the last byte (support#1574).
  • Added disconnect method to pybricks.pupdevices.Remote and
    pybricks.iodevices.LWP3Device (support#802).

Changed

  • Raise a descriptive error when the Car class can't find a steering mechanism
    end stop within 10 seconds (support#1564).
  • Extended region of readable data with hub.system.storage to include
    user program (pybricks-micropython#243).

Fixed

  • Fixed hubs not shutting down when holding hub button (support#1419).