MATLAB: How to use the LEGO® Mindstorms® NXT robot in the Simulink® environment

Control System ToolboxEmbedded CodersimulinkSimulink 3D Animationsimulink codersimulink fixed pointstateflowStateflow Coder

I am interested in programming the LEGO Mindstorms NXT robots. In particular, I would like to model the control system that governs the robot's movement and balance. I would like to run the simulation in Simulink and then deploy the algorithm onto the robot's ARM® processor.

Best Answer

The following link describes a Simulink-based solution for LEGO Mindstorms NXT. It allows the user to model the plant and controller in Simulink and visualize the system using Simulink 3D Animation. Code can then be generated using Real-Time Workshop to target the onboard ARM processor and verify the control algorithm on the actual NXT robot.
Note: This solution requires several freely-available third party products in order to compile the C code and download it to the LEGO NXT.
Related Question