View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
Navigating waypoints with a Lego MINDSTORMS NXT Robot

5.0 | 1 rating Rate this file 12 Downloads (last 30 days) File Size: 2.05 MB File ID: #42835 Version:
image thumbnail

Navigating waypoints with a Lego MINDSTORMS NXT Robot



22 Aug 2013 (Updated )

Organize a student competition using Lego MINDSTORMS NXT Robot with MATLAB and Simulink.

| Watch this File

File Information

On Mar 15, 2013 MathWorks UK held a student competition that had teams come together and perform a set of 4 tasks leading to a final competition that had Lego MINDSTORMS NXT robot navigate a set of waypoints as quickly as possible.
This File Exchange Submission collects the set of 4 preliminary tasks along with sample models that anyone can explore and learn how the Simulink Support Package for Lego MINDSTORMS NXT Hardware works.

The tasks are:

Task 1: Spin your robot in place – both in simulation and on the robot itself. Compare results to see if they match.

Task 2: Explore and try a simulation of the robot on the floor with sample target waypoints, change controller parameters to see changes in behavior. Compare results.

Task 3: Run the same algorithm from previous task on the real robot, logging real time histories. Compare to previous simulation.

Task 4: Design and simulate your algorithm for an arbitrary set of waypoints, explore algorithms to find the shortest distance between points.

This example uses this Simulink Support Package for LEGO MINDSTORMS NXT Hardware:

Learn more about running Simulink models on target hardware here:


Simulink Support Package For Lego Mindstorms Nxt Hardware inspired this file.

Required Products Simulink
MATLAB release MATLAB 8.1 (R2013a)
Other requirements Simulink Support for LEGO MINDSTORMS NXT requires Microsoft Windows.
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (4)
24 Jul 2016 Stuart McGarrity

30 Jun 2014 Dan Lluch

Dan Lluch (view profile)

@Kang - this submission requires you have installed the Simulink Support Package for LEGO MINDSTORMS NXT Hardware. you can find more info no that here:

your second question - you'll see LEGOModel used at the beginning of task 3 (refer to the task 3 PDF).

Good luck - Dan

Comment only
29 Jun 2014 kang

kang (view profile)

another question,what's the function of LEGOModel.slx file?It seems that I don't use it when running the example?

Comment only
29 Jun 2014 kang

kang (view profile)

First,I want to thangks for your sharing.But i have question about the example.I don't have a Lego MINDSTORMS NXT robot,I have downloaded the support file named “legomindstormsnxt.mlpkginstall ”,but I don't know how to use it.Can I you tell me?

Comment only
22 Aug 2013 1.1

added MathWorks Copyright information

01 Sep 2016

Updated license

Contact us