{"id":144,"date":"2008-06-30T10:00:28","date_gmt":"2008-06-30T15:00:28","guid":{"rendered":"https:\/\/blogs.mathworks.com\/loren\/2008\/06\/30\/lego-mindstorms-nxt-in-teaching\/"},"modified":"2020-10-20T13:21:54","modified_gmt":"2020-10-20T17:21:54","slug":"lego-mindstorms-nxt-in-teaching","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/loren\/2008\/06\/30\/lego-mindstorms-nxt-in-teaching\/","title":{"rendered":"LEGO Mindstorms NXT in Teaching"},"content":{"rendered":"<div class=\"content\">\n<p>Today I\u2019d like to introduce a guest blogger, <a href=\"mailto:gautam.vallabha@mathworks.com\">Gautam Vallabha<\/a>, a developer here at The MathWorks who works on classroom applications of MATLAB. Today he shows you one way in which MATLAB<br \/>\ncan be used to teach programming concepts.<\/p>\n<p>&nbsp;<\/p>\n<h3>Contents<\/h3>\n<div>\n<ul>\n<li><a href=\"#1\">Introduction<\/a><\/li>\n<li><a href=\"#2\">What is LEGO Mindstorms?<\/a><\/li>\n<li><a href=\"#3\">Step 1: Build an NXT Robot<\/a><\/li>\n<li><a href=\"#5\">Step 2: Set Up the Bluetooth Connection<\/a><\/li>\n<li><a href=\"#6\">Step 3: Set Up a Connection Between MATLAB and the Tribot<\/a><\/li>\n<li><a href=\"#13\">Step 4: Create Tribot Programs in MATLAB!<\/a><\/li>\n<li><a href=\"#17\">What Else?<\/a><\/li>\n<li><a href=\"#18\">UPDATE<\/a><\/li>\n<\/ul>\n<\/div>\n<h3>Introduction<a name=\"1\"><\/a><\/h3>\n<p>Before I joined The MathWorks, I was an academic doing research on neural networks and neuroscience. MATLAB's utility in research<br \/>\nis a commonplace, but one thing that struck me was its utility in learning: its interpreted nature and visualization allowed<br \/>\nme to play with ideas numerically and graphically. Today, I want to highlight one such teaching application, which is the<br \/>\nuse of MATLAB with the LEGO Mindstorms robotics system.<\/p>\n<h3>What is LEGO Mindstorms?<a name=\"2\"><\/a><\/h3>\n<p>The <a href=\"\">LEGO Mindstorms NXT<\/a> is a \"robotics system\" composed of a few sensors, motors, and an embedded processor (the \"NXT brick\"). What makes the system<br \/>\nmore than just an obscure hobbyist toy is its price (around $250, in the same ballpark as consumer electronics items) and<br \/>\nthe decision by LEGO to create an open programming interface. This allows third-party programs to send commands to the NXT over a Bluetooth wireless link, compile programs to be executed<br \/>\nautonomously on the NXT, or replace the NXT firmware entirely with custom firmware and programs. In this post, I focus on<br \/>\nthe Bluetooth wireless approach.<\/p>\n<p>But what does this have to do with teaching? Simply this: it is now easy and (relatively) inexpensive to connect lines of<br \/>\ncode on a computer screen to concrete actions in the world. A LEGO Mindstorms robot's actions - scooting around the room,<br \/>\nbumping off the walls, playing sounds - can be controlled on the fly by a MATLAB program. This provides a powerful way to<br \/>\nmotivate students to explore and master programming concepts.<\/p>\n<h3>Step 1: Build an NXT Robot<a name=\"3\"><\/a><\/h3>\n<p>Let's see how to control the standard NXT example robot, the <i>tribot<\/i>.<\/p>\n<p><a href=\"https:\/\/blogs.mathworks.com\/images\/loren\/144\/tribot_large.jpg\"> <img decoding=\"async\" src=\"https:\/\/blogs.mathworks.com\/images\/loren\/144\/tribot.png\" \/> <\/a><\/p>\n<p>The tribot has two independently-powered wheels, a touch sensor in front to detect obstacles, and a sound sensor (so that<br \/>\nthe tribot can be started or stopped with a clap, for example). In addition, it has a pair of claws that are powered by a<br \/>\nthird motor. The NXT has four sensor ports (<i>Port1<\/i> \u2013 <i>Port4<\/i>) and three motor ports (<i>PortA<\/i> \u2013 <i>PortC<\/i>). In a typical configuration,<\/p>\n<div>\n<ul>\n<li><i>PortA<\/i> is connected to the claw motor<\/li>\n<li><i>PortB<\/i> and <i>PortC<\/i> are connected to the left and right wheel motors<\/li>\n<li><i>Port1<\/i> and <i>Port2<\/i> are connected to the touch and sound sensors.<\/li>\n<\/ul>\n<\/div>\n<h3>Step 2: Set Up the Bluetooth Connection<a name=\"5\"><\/a><\/h3>\n<p>Next I establish a Bluetooth connection between the LEGO NXT and the host computer. To do this, I need a Bluetooth adapter<br \/>\n(preferably one recommended by LEGO). Once the adapter is installed and paired with the LEGO NXT, the communication channel shows up on the host computer as<br \/>\na virtual serial port (e.g., 'COM40').<\/p>\n<h3>Step 3: Set Up a Connection Between MATLAB and the Tribot<a name=\"6\"><\/a><\/h3>\n<p>I use the <a href=\"https:\/\/www.mathworks.com\/access\/helpdesk\/help\/techdoc\/index.html?\/access\/helpdesk\/help\/techdoc\/matlab_external\/f38496.html\">serial port I\/O<\/a> capability to access a serial port. The <a href=\"https:\/\/www.mathworks.com\/hardware-support\/lego-mindstorms-matlab.html\">freely-downloadable MATLAB toolbox<\/a> wraps this communication channel into a high-level object-oriented interface. A similar, though non-object-oriented, toolbox<br \/>\nhas also been developed at RWTH Aachen University in Germany.<\/p>\n<table border=\"0\" cellpadding=\"6\">\n<tbody>\n<tr>\n<td bgcolor=\"#F9F700\"><b>See <a href=\"#18\">UPDATE<\/a> at the bottom of this post<\/b><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Once the MATLAB toolbox is downloaded and installed, I first need to add the download directory to the MATLAB path, using<br \/>\n<a href=\"https:\/\/www.mathworks.com\/help\/matlab\/ref\/addpath.html\"><tt>addpath<\/tt><\/a>.<\/p>\n<p>Now I can initiate a MATLAB connection to the tribot. (You can try out the toolbox even if you do not have a LEGO robot by<br \/>\nusing <tt>'test'<\/tt> for the name of the serial port).<\/p>\n<pre style=\"background: #F9F7F3; padding: 10px; border: 1px solid #c8c8c8;\">nxt = legoNXT(<span style=\"color: #a020f0;\">'test'<\/span>);<\/pre>\n<p><tt>nxt<\/tt> is a MATLAB object and the input and output ports are objects also.<\/p>\n<pre style=\"background: #F9F7F3; padding: 10px; border: 1px solid #c8c8c8;\">leftMotor = nxt.PortB;\r\ntouchSensor = nxt.Port1;\r\nwhos <span style=\"color: #a020f0;\">nxt<\/span> <span style=\"color: #a020f0;\">leftMotor<\/span> <span style=\"color: #a020f0;\">touchSensor<\/span><\/pre>\n<pre style=\"font-style: oblique;\">  Name             Size            Bytes  Class         Attributes\r\n\r\n  leftMotor        1x1              1260  outputPort              \r\n  nxt              1x1               840  legoNXT                 \r\n  touchSensor      1x1               280  inputPort               \r\n\r\n<\/pre>\n<p>Issue commands by invoking the appropriate object methods. For example, let me to rotate the left wheel for 3 seconds at a<br \/>\npower level of 30 (out of a maximum of 100).<\/p>\n<pre style=\"background: #F9F7F3; padding: 10px; border: 1px solid #c8c8c8;\">start(leftMotor, 30);\r\npause(3);\r\nstop(leftMotor);<\/pre>\n<p>In order to read a sensor, I first need to tell the NXT what type of sensor is connected to the input port. From then on,<br \/>\nthe sensor can be read with a simple method call:<\/p>\n<pre style=\"background: #F9F7F3; padding: 10px; border: 1px solid #c8c8c8;\"><span style=\"color: #228b22;\">% configure nxt as a touch sensor<\/span>\r\nset(nxt.Port1, <span style=\"color: #a020f0;\">'type'<\/span>, <span style=\"color: #a020f0;\">'touch'<\/span>);\r\n<span style=\"color: #228b22;\">% get a sensor reading<\/span>\r\nv = getdata(nxt.Port1);<\/pre>\n<p>The NXT Bluetooth interface has other capabilities in addition to accessing motors and sensors. To access these capabilities,<br \/>\nI need to get the \"low-level\" NXT interface from the nxt object.<\/p>\n<pre style=\"background: #F9F7F3; padding: 10px; border: 1px solid #c8c8c8;\">type <span style=\"color: #a020f0;\">lowlevelNXT<\/span><\/pre>\n<pre style=\"font-style: oblique;\"> nxti = get(nxt, 'NxtInterface');\r\n % Play a 1000 Hz tone for 300 milliseconds \r\n playTone(nxti,1000,300);\r\n % execute a program already present on the NXT\r\n startProgram(nxti, 'Demo.rxe');\r\n % get a full list of low-level commands\r\n help nxtInterface\/Contents     \r\n\r\n<\/pre>\n<p>Finally, close and clean up the interface.<\/p>\n<pre style=\"background: #F9F7F3; padding: 10px; border: 1px solid #c8c8c8;\">delete(nxt);\r\nclear <span style=\"color: #a020f0;\">nxt<\/span><\/pre>\n<h3>Step 4: Create Tribot Programs in MATLAB!<a name=\"13\"><\/a><\/h3>\n<p>The capabilities I just showed provide the building blocks for students to explore a variety of programming concepts. A simple<br \/>\nassignment might be, \"wait until the sensor is pressed and released five times\". This assignment requires understanding of<br \/>\nboth looping and conditionals. Here's one solution.<\/p>\n<pre style=\"background: #F9F7F3; padding: 10px; border: 1px solid #c8c8c8;\">type <span style=\"color: #a020f0;\">checkSensor<\/span><\/pre>\n<pre style=\"font-style: oblique;\">function checkSensor(nxt)\r\n% sensor values less than 50 =&gt; touch sensor is depressed\r\ncount = 0;\r\npreviousValue = 100; \r\nwhile count &lt; 5\r\n   currentValue  = getdata(nxt.Port1); \r\n   if (previousValue &gt;= 50) &amp;&amp; (currentValue &lt; 50)\r\n      count = count + 1;    \r\n   end\r\n   previousValue = currentValue;\r\nend\r\n\r\n<\/pre>\n<p>Motor actions lend themselves naturally to grouping, through the use of functions. This function has the tribot back up for<br \/>\n<tt>duration<\/tt> seconds, chirping all the while.<\/p>\n<pre style=\"background: #F9F7F3; padding: 10px; border: 1px solid #c8c8c8;\">type <span style=\"color: #a020f0;\">backupTribot<\/span><\/pre>\n<pre style=\"font-style: oblique;\">function backupTribot(nxt, duration)\r\n\r\nnxti = get(nxt, 'NxtInterface');\r\nplaySoundFile(nxti, '! Attention.rso', 1);\r\nstart(nxt.PortB, -20); start(nxt.PortC, -20);\r\npause(duration);\r\nstop(nxt.PortB); stop(nxt.PortC);\r\nplaySoundFile(nxtInterface, '! Attention.rso', 0);\r\n\r\n<\/pre>\n<p>An advantage of developing these programs in MATLAB is that students can use the MATLAB environment for interactive debugging<br \/>\nand visualization. For more advanced assignments, students could build a MATLAB-based GUI to control a robot (these would<br \/>\nintegrate well with teaching object-oriented programming). To give a flavor of such GUI-based control, the toolbox ships with<br \/>\n<tt>nxtdemo<\/tt>, a sample GUI.<\/p>\n<p><a href=\"https:\/\/blogs.mathworks.com\/images\/loren\/144\/remote_control_gui_large.png\"> <img decoding=\"async\" src=\"https:\/\/blogs.mathworks.com\/images\/loren\/144\/remote_control_gui.png\" \/> <\/a><\/p>\n<p>I should note that the NXT Bluetooth interface does not provide support for fine motor control (for example, to rotate a motor<br \/>\nthrough a specified angle). Likewise, the round trip latency \u2013 sending a command from the PC to the NXT and receiving a response<br \/>\nis on the order of 30 ms \u2013 makes it impractical for real-time control. Nevertheless, the basic capabilities provide enough<br \/>\nflexibility for <a href=\"http:\/\/www.youtube.com\/results?search_query=mindstorms+matlab&amp;search_type=&amp;aq=f\">many interesting projects<\/a>.<\/p>\n<p>For those looking for real-time control, there is a free <a href=\"https:\/\/www.mathworks.com\/hardware-support.html?fq=hardware-support-vendor:lego\">Simulink-based library<\/a> that provides much more sophisticated <a href=\"http:\/\/www.youtube.com\/results?search_query=simulink+lego+nxt&amp;search_type=&amp;aq=-1&amp;oq=\">embedded control<\/a>.<\/p>\n<h3>What Else?<a name=\"17\"><\/a><\/h3>\n<p>What other capabilities would make the MATLAB + LEGO NXT combination especially useful in a classroom? Let me know in <a href=\"https:\/\/blogs.mathworks.com\/loren\/?p=144#respond\">here<\/a>.<\/p>\n<h3>UPDATE<a name=\"18\"><\/a><\/h3>\n<table border=\"1\" cellpadding=\"6\">\n<tbody>\n<tr>\n<td bgcolor=\"#F9F700\">As of April 2010, the toolbox described above is deprecated and no longer<br \/>\navailable. We encourage users to download the<br \/>\n<a href=\"http:\/\/www.mindstorms.rwth-aachen.de\/\">RWTH Aachen Mindstorms NXT Toolbox<\/a><br \/>\n--- it has all the capabilities described above, as well as<br \/>\nsupport for precise motor control and ability to control the robot over<br \/>\na USB cable. For more information, see <a href=\"https:\/\/www.mathworks.com\/hardware-support\/lego-mindstorms-matlab.html\">LEGO MINDSTORMS NXT Software for<br \/>\nMATLAB and Simulink<\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><script>\/\/ <![CDATA[\nfunction grabCode_5294224b9d8a4bbbb1b840dc2ad09a10() {\n        \/\/ Remember the title so we can use it in the new page\n        title = document.title;\n\n        \/\/ Break up these strings so that their presence\n        \/\/ in the Javascript doesn't mess up the search for\n        \/\/ the MATLAB code.\n        t1='5294224b9d8a4bbbb1b840dc2ad09a10 ' + '##### ' + 'SOURCE BEGIN' + ' #####';\n        t2='##### ' + 'SOURCE END' + ' #####' + ' 5294224b9d8a4bbbb1b840dc2ad09a10';\n    \n        b=document.getElementsByTagName('body')[0];\n        i1=b.innerHTML.indexOf(t1)+t1.length;\n        i2=b.innerHTML.indexOf(t2);\n \n        code_string = b.innerHTML.substring(i1, i2);\n        code_string = code_string.replace(\/REPLACE_WITH_DASH_DASH\/g,'--');\n\n        \/\/ Use \/x3C\/g instead of the less-than character to avoid errors \n        \/\/ in the XML parser.\n        \/\/ Use '\\x26#60;' instead of '<' so that the XML parser\n        \/\/ doesn't go ahead and substitute the less-than character. \n        code_string = code_string.replace(\/\\x3C\/g, '\\x26#60;');\n\n        author = 'Loren Shure';\n        copyright = 'Copyright 2010 The MathWorks, Inc.';\n\n        w = window.open();\n        d = w.document;\n        d.write('\n\n\n\n\n\n\n\n<pre>\\n');\r\n        d.write(code_string);\r\n\r\n        \/\/ Add author and copyright lines at the bottom if specified.\r\n        if ((author.length > 0) || (copyright.length > 0)) {\r\n            d.writeln('');\r\n            d.writeln('%%');\r\n            if (author.length > 0) {\r\n                d.writeln('% _' + author + '_');\r\n            }\r\n            if (copyright.length > 0) {\r\n                d.writeln('% _' + copyright + '_');\r\n            }\r\n        }\r\n\r\n        d.write('<\/pre>\n\n\n\n\n\n\n\n\n\\n');\n      \n      d.title = title + ' (MATLAB code)';\n      d.close();\n      }\n\/\/ ]]><\/script><\/p>\n<p style=\"text-align: right; font-size: xx-small; font-weight: lighter; font-style: italic; color: gray;\"><a><span style=\"font-size: x-small; font-style: italic;\">Get<br \/>\nthe MATLAB code<br \/>\n<noscript>(requires JavaScript)<\/noscript><\/span><\/a><\/p>\n<p>Published with MATLAB\u00ae 7.10<\/p>\n<\/div>\n<p><!--\n5294224b9d8a4bbbb1b840dc2ad09a10 ##### SOURCE BEGIN #####\n%% LEGO Mindstorms NXT in Teaching\n% Today I\u00e2\u20ac&#x2122;d like to introduce a guest blogger,\n% <mailto:gautam.vallabha@mathworks.com Gautam Vallabha>,\n% a developer here at The MathWorks who works on classroom applications of\n% MATLAB. Today he shows you one way in which MATLAB can be used to teach\n% programming concepts.\n\n%% Introduction\n% Before I joined The MathWorks, I was an academic doing research on neural\n% networks and neuroscience. MATLAB's utility in research is a commonplace,\n% but one thing that struck me was its utility in learning: its interpreted\n% nature and visualization allowed me to play with ideas numerically and\n% graphically. Today, I want to highlight one such teaching application,\n% which is the use of MATLAB with the LEGO Mindstorms robotics system.\n\n%% What is LEGO Mindstorms?\n% The\n% < LEGO Mindstorms NXT>\n% is a \"robotics system\" composed of a few sensors,\n% motors, and an embedded processor (the \"NXT brick\"). What makes the\n% system more than just an obscure hobbyist toy is its price (around $250,\n% in the same ballpark as consumer electronics items) and the decision by\n% LEGO to create an\n% <Overview\/NXTreme.aspx open programming interface>.\n% This allows third-party programs to send commands to the NXT over a\n% Bluetooth wireless link, compile programs to be executed autonomously\n% on the NXT, or replace the NXT firmware entirely with custom firmware\n% and programs. In this post, I focus on the Bluetooth wireless\n% approach.\n%\n% But what does this have to do with teaching? Simply this: it is now easy\n% and (relatively) inexpensive to connect lines of code on a computer\n% screen to concrete actions in the world. A LEGO Mindstorms robot's\n% actions - scooting around the room, bumping off the walls, playing\n% sounds - can be controlled on the fly by a MATLAB program. This provides\n% a powerful way to motivate students to explore and master programming\n% concepts.\n\n%% Step 1: Build an NXT Robot\n% Let's see how to control the standard NXT example robot, the _tribot_.\n%\n% <html>\n% <a href=\"tribot_large.jpg\"> <img decoding=\"async\" src=\"tribot.png\"> <\/a>\n% <\/html>\n%\n\n%%\n% The tribot has two independently-powered wheels, a touch sensor in front\n% to detect obstacles, and a sound sensor (so that the tribot can be\n% started or stopped with a clap, for example). In addition, it has a pair of\n% claws that are powered by a third motor. The NXT has four sensor ports\n% (_Port1_ \u00e2\u20ac\u201c _Port4_) and three motor ports (_PortA_ \u00e2\u20ac\u201c _PortC_). In a typical\n% configuration,\n%\n% * _PortA_ is connected to the claw motor\n% * _PortB_ and _PortC_ are connected to the left and right wheel motors\n% * _Port1_ and _Port2_ are connected to the touch and sound sensors.\n%\n\n%% Step 2: Set Up the Bluetooth Connection\n% Next I establish a Bluetooth connection between the LEGO\n% NXT and the host computer. To do this, I need a Bluetooth adapter\n% (preferably one\n% <overview\/Bluetooth.aspx recommended by LEGO>).\n% Once the adapter is installed and paired with the LEGO NXT, the\n% communication channel shows up on the host computer as a virtual serial\n% port (e.g., 'COM40').\n\n%% Step 3: Set Up a Connection Between MATLAB and the Tribot\n%\n% I use the\n% <https:\/\/www.mathworks.com\/access\/helpdesk\/help\/techdoc\/index.html?\/access\/helpdesk\/help\/techdoc\/matlab_external\/f38496.html % serial port I\/O> capability to access a serial port.\n% The <https:\/\/www.mathworks.com\/hardware-support\/lego-mindstorms-matlab.html freely-downloadable MATLAB toolbox>\n% wraps this communication channel into a high-level object-oriented\n% interface. A similar, though non-object-oriented, toolbox has also been\n% developed at  <http:\/\/www.lfb.rwth-aachen.de\/en\/education\/ws07\/mindstorms.html RWTH % Aachen> University in Germany.\n%\n% <html>\n%\n\n\n<table cellpadding=\"6\" border=0>\n\n\n<tr>\n\n\n<td bgcolor=#F9F700 >\n% <b>See <a href=\"#18\">UPDATE<\/a> at the bottom of this post<\/b>\n%<\/td>\n\n\n<\/tr>\n\n\n<\/table>\n\n\n% <\/html>\n%\n% Once the MATLAB toolbox is downloaded and installed, I first need to add\n% the download directory to the MATLAB path, using\n% <https:\/\/www.mathworks.com\/help\/matlab\/ref\/addpath.html |addpath|>.\n\n%%\n% Now I can initiate a MATLAB connection to the tribot. (You can try out the\n% toolbox even if you do not have a LEGO robot by using |'test'| for the name\n% of the serial port).\n\nnxt = legoNXT('test');\n\n%%\n% |nxt| is a MATLAB object and the input and output ports are objects also.\nleftMotor = nxt.PortB;\ntouchSensor = nxt.Port1;\nwhos nxt leftMotor touchSensor\n\n%%\n% Issue commands by invoking the appropriate object methods. For\n% example, let me to rotate the left wheel for 3 seconds at a power level\n% of 30 (out of a maximum of 100).\nstart(leftMotor, 30);\npause(3);\nstop(leftMotor);\n\n%%\n% In order to read a sensor, I first need to tell the NXT what type of\n% sensor is connected to the input port. From then on, the sensor can be\n% read with a simple method call:\n\n% configure nxt as a touch sensor\nset(nxt.Port1, 'type', 'touch');\n% get a sensor reading\nv = getdata(nxt.Port1);\n\n%%\n% The NXT Bluetooth interface has other capabilities in addition to accessing\n% motors and sensors. To access these capabilities, I need to get the\n% \"low-level\" NXT interface from the nxt object.\ntype lowlevelNXT\n\n%%\n% Finally, close and clean up the interface.\ndelete(nxt);\nclear nxt\n\n%% Step 4: Create Tribot Programs in MATLAB!\n% The capabilities I just showed provide the building blocks for students\n% to explore a variety of programming concepts. A simple assignment might\n% be, \"wait until the sensor is pressed and released five times\". This\n% assignment requires understanding of both looping and conditionals.\n% Here's one solution.\n\ntype checkSensor\n\n%%\n% Motor actions lend themselves naturally to grouping, through the use of\n% functions. This function has the tribot back up for |duration| seconds,\n% chirping all the while.\n\ntype backupTribot\n\n%%\n% An advantage of developing these programs in MATLAB is that students can\n% use the MATLAB environment for interactive debugging and visualization.\n% For more advanced assignments, students could build a MATLAB-based GUI to\n% control a robot (these would integrate well with teaching object-oriented\n% programming). To give a flavor of such GUI-based control, the toolbox\n% ships with |nxtdemo|, a sample GUI.\n%\n% <html>\n% <a href=\"remote_control_gui_large.png\"> <img decoding=\"async\" src=\"remote_control_gui.png\"> <\/a>\n% <\/html>\n%\n\n%%\n% I should note that the NXT Bluetooth interface does not provide support\n% for fine motor control (for example, to rotate a motor through a\n% specified angle). Likewise, the round trip latency \u00e2\u20ac\u201c sending a command\n% from the PC to the NXT and receiving a response is on the order of 30 ms\n% \u00e2\u20ac\u201c makes it impractical for real-time control. Nevertheless, the basic\n% capabilities provide enough flexibility for\n% <http:\/\/www.youtube.com\/results?search_query=mindstorms+matlab&search_type=&aq=f % many interesting projects>.\n%\n% For those looking for real-time control, there is a free\n% <https:\/\/www.mathworks.com\/hardware-support.html?fq=hardware-support-vendor:lego Simulink-based library>\n% that provides much more sophisticated\n% <http:\/\/www.youtube.com\/results?search_query=simulink+lego+nxt&search_type=&aq=-1&oq= % embedded control>.\n\n%% What Else?\n%\n% What other capabilities would make the MATLAB + LEGO NXT combination\n% especially useful in a classroom? Let me know in\n% <https:\/\/blogs.mathworks.com\/loren\/?p=144#respond here>.\n\n%% UPDATE\n% <html>\n%\n\n\n<table cellpadding=\"6\" border=1>\n\n\n<tr>\n\n\n<td bgcolor=#F9F700 >\n% As of April 2010, the toolbox described above is deprecated and no longer\n% available. We encourage users to download the\n% <a href=\"http:\/\/www.mindstorms.rwth-aachen.de\/\">RWTH Aachen Mindstorms NXT Toolbox<\/a>\n% REPLACE_WITH_DASH_DASH- it has all the capabilities described above, as well as\n% support for precise motor control and ability to control the robot over\n% a USB cable. For more information, see <a % href=\"https:\/\/www.mathworks.com\/hardware-support\/lego-mindstorms-matlab.html\">LEGO MINDSTORMS NXT Software for\n% MATLAB and Simulink<\/a>\n%<\/td>\n\n\n<\/tr>\n\n\n<\/table>\n\n\n% <\/html>\n\n##### SOURCE END ##### 5294224b9d8a4bbbb1b840dc2ad09a10\n--><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\nToday I\u2019d like to introduce a guest blogger, Gautam Vallabha, a developer here at The MathWorks who works on classroom applications of MATLAB. Today he shows you one way in which MATLAB<br \/>\ncan be used... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/loren\/2008\/06\/30\/lego-mindstorms-nxt-in-teaching\/\">read more >><\/a><\/p>\n","protected":false},"author":39,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[25],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/loren\/wp-json\/wp\/v2\/posts\/144"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/loren\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/loren\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/loren\/wp-json\/wp\/v2\/users\/39"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/loren\/wp-json\/wp\/v2\/comments?post=144"}],"version-history":[{"count":6,"href":"https:\/\/blogs.mathworks.com\/loren\/wp-json\/wp\/v2\/posts\/144\/revisions"}],"predecessor-version":[{"id":3867,"href":"https:\/\/blogs.mathworks.com\/loren\/wp-json\/wp\/v2\/posts\/144\/revisions\/3867"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/loren\/wp-json\/wp\/v2\/media?parent=144"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/loren\/wp-json\/wp\/v2\/categories?post=144"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/loren\/wp-json\/wp\/v2\/tags?post=144"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}