Programming the LEGO MINDSTORMS NXT Robotics Toolkit
with MATLAB and Simulink
Free Code for LEGO MINDSTORMS NXT Remote Control and Embedded Control
The LEGO® MINDSTORMS® NXT robotics invention system lets you create and control robots using programmable motors and sensors. You can use MATLAB and Simulink to quickly program and test your LEGO MINDSTORMS NXT robots in a variety of ways.
MATLAB Based Code for LEGO MINDSTORMS NXT Remote ControlThe remote-control solution, which runs on your host computer, uses the MATLAB serial I/O capability to send commands to the LEGO MINDSTORMS NXT through a Bluetooth connection.
With the remote-control solution, you can:- Start programming right away without any additional toolboxes
- Work in the MATLAB environment for development and debugging
- Work with MATLAB and Simulink Student Version
- Learn programming concepts such as iteration, conditional statements, and object-oriented programming
The Embedded-Control Solution is developed using Simulink, Real-Time Workshop, and Real-Time Workshop Embedded Coder; it is then converted into machine language and downloaded to run on the LEGO MINDSTORMS NXT.
With the Embedded-Control Solution, you can:- Avoid Bluetooth range limitations because the program runs directly on the LEGO MINDSTORMS NXT
- Program the motors and sensors precisely for coordinated, real-time execution
- Model, visualize, and test your robot’s behavior using Virtual Reality Toolbox software
- Learn about control algorithms and production code generation using
Model-Based Design
To submit questions or comments about these solutions, please e-mail mindstorms@mathworks.com.
Related Products- MATLAB®
- Simulink®
- Data Acquisition Toolbox™
- Instrument Control Toolbox™
- MATLAB® & Simulink® Student Version
- Real-Time Workshop®
- Real-Time Workshop® Embedded Coder™
- Virtual Reality Toolbox™