I've been quietly working on several exciting firmware updates that should become available in beta in the weeks to come. This post gives you a sneak peek at the new updates.
The biggest noticeable changes are those concerning the builtin gyro. There will be a new optional calibration routine that lets you find and save a gyro correction factor that is unique to your hub. This improves accuracy, especially in bigger turns. For example, some gyros report 364 degrees for a single turn. This correction factor helps account for that.
The existing calibration settings will now be saved, which means that your settings activated in your scripts will be active immediately after turning on the hub. It will also be easier to reset the drive base angle, so you can choose a new angle after aligning the robot against a wall.
If you use multitasking in your code, you'll find that loops run a lot faster due to improved handling of asynchronous tasks.
Under the hood, a lot of changes have been made to prepare for storing multiple programs. You could already do this with your own menu, but making it easier has been a much requested feature. This may not be finished for the next release, but it's good to have much of the implementation already in place. As part of this, it will also become possible to turn off Bluetooth, which is a requirement in some robotics competition runs.
If you want the full technical details and read the community discussions, check out the items and links below. If you haven't already, feel free to participate in all of these discussions. I'd love to hear from you.
I'd like to thank all of you for supporting Pybricks, both here on Patreon and in the community discussions! You make these updates possible. You're awesome.
-- Laurens
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.
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.
Reduced default angular velocity stationary threshold from an undocumented 5 deg/s to 3 deg/s to reduce unwanted calibration while moving (support#1105).
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).
Sonder Robotics
2025-02-18 23:29:26 +0000 UTCLCR Brick Tech
2024-12-09 17:04:31 +0000 UTCLaurens Valk
2024-10-15 15:39:00 +0000 UTCSanjay
2024-10-15 15:27:16 +0000 UTCLaurens Valk
2024-10-04 17:03:49 +0000 UTCNathan Tracey
2024-09-28 16:18:22 +0000 UTCRTC
2024-09-24 10:52:36 +0000 UTCLaurens Valk
2024-09-24 06:40:05 +0000 UTCRTC
2024-09-24 01:16:27 +0000 UTCchris
2024-09-21 11:35:42 +0000 UTC