MATRIXblock R4 Update! Smarter Control, Greater Stability ; )
- Anthony Hsu

- Oct 10
- 3 min read

This is one of the biggest updates so far — a major overhaul from sensors to motion control algorithms.
Let’s take a look at what’s new in v6.0 👇
⚙️ DC Motor Advanced Control: Precision for Any Motor
New PPR (Pulses Per Revolution) and RPM settings now make it easy to support third-party motors (0~100% is 0v to 5v).

PID speed control mode (similar to LEGO’s Speed Mode)
Compensates for uneven weight distribution
Ensures straight-line driving even under imbalanced loads
Requires encoder motors

🚗 DriveDC Chassis Control Class: A Unified Driving System
The new DriveDC class brings a “Movement Block”, Easily to use for robotics education, competitions projects.
Highly configurable for multiple chassis setups (When Brake Settle is enabled, the robot waits 110ms after braking to ensure greater stability.)

Supports Tank Move, Sync Move and Gyro Move drive control!

Built-in straight, turn, and rotation movement options

⚠️ A Hold mode (PID-based braking) will be added in a future release.
🌈 Color Sensor Improvements, A New Color ID mode.
All MXColor (V1-V3) now feature unified HSV and Color ID modes

Color templates now follow official LEGO Bricks color standards (most use colors with WRO)

Added support for HiTechnic Color Sensor V2 (Need to make your own cables. The pinout information can be found in the datasheet or on the back of the host.)

These upgrades make color recognition far more stable and accurate, Easier to use, especially in WRO competitions or classroom environments.
*If want more accurate readings, it is recommended to use HSV to create your own formula.
🧭 IMU Enhancements: Redesigned STM32-Based Algorithm
The IMU system has been completely re-engineered with our STM32 microcontroller, with Automatic Calibration and Filtering Algorithm, bringing major improvements in accuracy.
In testing, rotation drift was significantly reduced, and long-distance driving became much more stable.
! Important Notice: Automatic Calibration on Startup !
Whenever the robot powers on or resets, the IMU will automatically perform a calibration routine.
🔸 Do not move or shake the robot during this process, as any vibration or motion will interfere with the IMU’s internal calibration. 🔸 The process only takes a about 1.5 seconds at start up, and you’ll get the best results if the robot remains perfectly still until initialization completes. 🔸 If use the accelerometer, change the XYZ parameter to RAW_XYZ to get raw data, or perform the one-time calibration below. The calibration data is permanently stored unless the hardware is replaced. 🔸 Accelerometer calibration feature is optional, manual calibration. (The ACC calibration procedure needs to be executed from the Arduino IDE->Examples->MatrixMiniR4->Sensor Readings->MiniR4_IMU_CalibAccel)
✅ Boolean constant now available!

With Boolean constant, you can easily to design your program, using constant as a option for your my block!
📚 Example Programs and Fixes
This version comes with several new and updated examples:
MXColor usage demo (thanks to GitHub user jithintj)
DriveDC chassis control demo
IMU calibration and usage guide
📂 Check them out in the Arduino IDE->Examples->MatrixMiniR4 folder of the library.
🐞 Stability and Bug Fixes
Improved overall system stability, include STM32 side.
Enhanced motor control reliability
Arduino Framework Core Upgrade to v1.5.1
Important Notice: Firmware Update is Required!

This software update requires firmware v6.0+. Please go to File -> Firmware Update -> Download and update the firmware.



Comments