This page has moved into the new guide: Pathfinder 8-Way › SPIKE › Official LEGO App

LEGO® MINDSTORMS® Robot Inventor

Back to SPIKE Hubs

MINDSTORMS Hub + LEGO MINDSTORMS Inventor App

Warning

Please Note: You are currently viewing the tutorial for the 【LEGO® MINDSTORMS® Robot Inventor】 environment. If you are using EV3 or other system software, please click the button above to return to the hub menu and reselect.

This page applies to the LEGO® MINDSTORMS® Robot Inventor, utilizing the LEGO MINDSTORMS Inventor App block programming mode.

In this environment, the Pathfinder 8-Way Sensor will be perfectly identified by the LEGO system as an official "SPIKE Color Sensor".

Caution

Official Software Limitations of the Smart Hub (51515 MINDSTORMS® Hub) Due to the limitations of the official LEGO Robot Inventor App software, the values of some single-channel blocks are strictly limited to 0 ~ 126 by the official system. In order to allow you to still unleash the extreme performance of the Pathfinder 8-Way on this hub, we have developed an exclusive "Data Shunting and Squeezing" transmission protocol, successfully bypassing the 126 limit for position and reflected light massive data, directly mapping them onto the RGB and reflected light channels!


Physical Data Channel Mapping Table

You can directly pull the official "Reflected Light" or "RGB Value" blocks of the color sensor in your program to obtain the following data:

Official Block Channel Mapped Physical Data Value Range & Decoding Guide
🎨 Color Feature Line Width 0 ~ 8
👉 Due to the home version software limiting color to a maximum of 10, the feature line width here is normally between 0 ~ 8, commonly used for detecting intersections.
💡 Reflected Light Standard Position Shift Value 0 ~ 16
👉 8 represents dead center, 0 represents far left, 16 represents far right. Reading the value and subtracting 8 gives the line-following position (negative value means black line is on the left, positive means black line is on the right). The value is stable and completely unaffected by the 126 limit.
🔴 Red Channel High-Resolution Smooth Position 0 ~ 200
👉 100 represents dead center, 0 represents extreme left, 200 represents extreme right. Reading the value and subtracting 100 gives the high-precision line-following position (negative value means black line is on the left, positive means black line is on the right). This channel is perfectly lossless on the toy version, with no degradation whatsoever, and can be directly plugged into high-end PID line-following controls!
🟢 Green Channel First 4 Photoelectric Values 0 ~ 255
👉 First four photoelectric values: Every 2-bits represent a photoelectric value, value range 0 ~ 3.
🔵 Blue Channel Last 4 Photoelectric Values 0 ~ 255
👉 Last four photoelectric values: Every 2-bits represent a photoelectric value, value range 0 ~ 3.

Download Example Programs

LEGO® MINDSTORMS® Robot Inventor App Block Example

The image above demonstrates the classic PID line-following program structure in the LEGO® MINDSTORMS® Robot Inventor App for the 8-Way Line Follower.

After downloading, open it directly using the LEGO® MINDSTORMS® Robot Inventor App.


Tip

Want to learn more advanced line-following control methods? You can take classes from these awesome coaches! They have rich experience in competitions and teaching, guaranteeing you'll learn a lot! 💯

Email for a quoteBuying Guide