How to Make a Line-Following Robot Using STM32

MATLAB
3,158 views February 10, 2026

Learn how to build a line-following robot with STM32 and Simulink®. You’ll see step-by-step instructions for installing support packages, configuring models, and setting up sensors and motors. The core line-following algorithm is explained, showing how sensor values control motor actions to keep the robot on track. Finally, watch a free demo for simulating the robot, making it ideal for hands-on learning and Model-Based Design education. Perfect for beginners and educators interested in robotics and embedded systems. Additional Resources: - Visit the Student Tutorials and Videos for additional videos: https://bit.ly/2XX5K1t - Request software for your student competition: https://bit.ly/2U6e4uE Chapters: 00:00 Introduction 0:30 What You Need to Prepare to Control STM32 Hardware 1:08 How to Install MATLAB Products? 2:07 Simulink and CubeMX Model Settings and Operation Check for Light Sensors and Motors 7:59 Linetrace Algorithm 9:03 Available Demo from MathWorks -------------------------------------------------------------------------------------------------------- Get a free product trial: https://goo.gl/ZHFb5u Learn more about MATLAB: https://goo.gl/8QV7ZZ Learn more about Simulink: https://goo.gl/nqnbLe See what's new in MATLAB and Simulink: https://goo.gl/pgGtod © 2025 The MathWorks, Inc. MATLAB and Simulink are registered trademarks of The MathWorks, Inc. See www.mathworks.com/trademarks for a list of additional trademarks. Other product or brand names may be trademarks or registered trademarks of their respective holders.

Keyboard shortcuts

On. Switch them off if they collide with your assistive tools; ? still opens this sheet.

Go to

Press g then the letter.

  • gh Latest
  • gs Sources
  • gm Media
  • gv Videos
  • gp Podcasts
  • gc Calendar
  • gd Decoder
  • gz Dataviz
  • ga Datasets
  • gb Blog
  • gk Markets
  • gj Careers
  • gn Prompt Notebook

On this page

  • / Focus search, where there is one
  • t Back to top
  • ? This list
  • Esc Close