Upcoming firmware updates!
🕑 Added 2024-09-20 09:57:04 +0000 UTCI'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
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.
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.
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
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).
Comments
Sonder Robotics
Added interface and implementation for storing and selecting multiple code slots on the Prime Hub and Inventor Hub. Do you have documentation on how to use this? Is it supported for both python and code blocks?
LCR Brick Tech
Whoa, thatβs awesome! Iβm eagerly looking forward to trying it out! The video showcasing PyBricks and PyBricks blocks is coming soon! -Lorenzo
Laurens Valk
You can already try it using https://beta.pybricks.com/ It was released just hours ago. Good timing! :D
Sanjay
Thanks for the bluetooth support. This one is really awesome! Would the beta release be promoted to a regular release soon enough in time for WRO 2024? The finals start on 28th Nov, but having it couple fo weeks earlier would help teams to tune their robots.
Laurens Valk
Yes. Choose run "towards" a target angle in the motor block.
Nathan Tracey
Is there a way to get a 51515 motor to go to a certain position like the Mindstorms app?
RTC
Thank you for explaining!
Laurens Valk
Thanks! The Playstation controllers use Bluetooth classic, which some of the LEGO hubs don't have. The Xbox Controller uses the newer Bluetooth Low Energy, which we do support, and which is also used to connect to the computer.
RTC
Awesome stuff. I was wondering if you will ever make it so you can use a PS controller like PS4 and PS5 controllers please. Also if you canβt could you please replay why. Thank you for the great program.
chris
Brilliant new features and improvements - I'm looking forward to the new firmware version! ππ