<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>degrunt.org: Getting a Lua program onto the NXT</title>
    <link>http://www.degrunt.org/articles/2008/06/06/getting-a-lua-program-onto-the-nxt</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>lego, mindstorms, technics, pneumatic</description>
    <item>
      <title>Getting a Lua program onto the NXT</title>
      <description>&lt;p&gt;In my last post, only yesterday, we&amp;#8217;ve seen how to install pbLua onto the &lt;span class="caps"&gt;LEGO NXT&lt;/span&gt;. Now we also want it to do something ofcourse.&lt;/p&gt;


	&lt;p&gt;Let&amp;#8217;s first start with connecting to the pbLua-NXT again (using screen &amp;#8211; or a utility if you like) and at the &amp;gt; prompt copy and paste the whole following code:&lt;/p&gt;


&lt;pre&gt;
-- Replace HelloWorld on the next line, with the name of the program you want
fileName = "HelloWorld" 

-- Replace the text between [[ and ]] with your own program.
programText = [[
nxt.DisplayClear()
nxt.DisplayText( "Hello, World!" )
]]

h = nxt.FileCreate( fileName, string.len(programText) )
nxt.FileWrite( h, programText )
nxt.FileClose( h )
&lt;/pre&gt;

	&lt;p&gt;This now created a file called &lt;code&gt;HelloWorld&lt;/code&gt; onto your &lt;span class="caps"&gt;NXT&lt;/span&gt;. To now also run the program give the following command: &lt;code&gt;nxt.dofile('HelloWorld')&lt;/code&gt;&lt;/p&gt;


	&lt;p&gt;That&amp;#8217;s all there is to it, isn&amp;#8217;t it easy?&lt;/p&gt;


	&lt;p&gt;Remember that this procedure is not needed if you just want try the &lt;span class="caps"&gt;API&lt;/span&gt;, remember (if you checked yesterday&amp;#8217;s article) that we did &lt;code&gt;nxt.SoundTone()&lt;/code&gt; on the console.&lt;/p&gt;</description>
      <pubDate>Fri, 06 Jun 2008 20:26:06 +0200</pubDate>
      <guid isPermaLink="false">urn:uuid:69a85cba-0071-4461-843d-7c18c44ed18f</guid>
      <author>Tom</author>
      <link>http://www.degrunt.org/articles/2008/06/06/getting-a-lua-program-onto-the-nxt</link>
      <category>mindstorms</category>
      <category>nxt</category>
      <category>programming</category>
    </item>
    <item>
      <title>"Getting a Lua program onto the NXT" by rsloads</title>
      <description>&lt;p&gt;If you wanna buy some other things which are not listed in our website:
&lt;a href="http://www.rsloads.com" rel="nofollow"&gt;runescape items&lt;/a&gt;
&lt;a href="http://www.rsloads.com/free.html" rel="nofollow"&gt;runescape gold&lt;/a&gt;
&lt;a href="http://www.rsloads.com" rel="nofollow"&gt;runescape powerleveling&lt;/a&gt;
&lt;a href="http://www.rsloads.com" rel="nofollow"&gt;runescape power leveling&lt;/a&gt;
&lt;a href="http://www.rsloads.com/runescape-questpoint.html" rel="nofollow"&gt;runescape quests&lt;/a&gt;
&lt;a href="http://www.rsloads.com/runescape-accounts.html" rel="nofollow"&gt;runescape accounts&lt;/a&gt;
&lt;a href="http://www.rsloads.com/runescape-powerleveling.html" rel="nofollow"&gt;runescape powerleveling&lt;/a&gt;
&lt;a href="http://www.rsloads.com/runescape-powerleveling.html" rel="nofollow"&gt;runescape power leveling&lt;/a&gt;
&lt;a href="http://www.g2gmart.com" rel="nofollow"&gt;runescape gold&lt;/a&gt;
&lt;a href="http://www.g2gmart.com" rel="nofollow"&gt;runescape items&lt;/a&gt;
&lt;a href="http://www.g2gmart.com" rel="nofollow"&gt;runescape money&lt;/a&gt;
&lt;a href="http://www.g2gmart.com" rel="nofollow"&gt;runescape quests&lt;/a&gt;
&lt;a href="http://www.g2gmart.com" rel="nofollow"&gt;runescape accounts&lt;/a&gt;
&lt;a href="http://www.g2gmart.com" rel="nofollow"&gt;runescape power leveling&lt;/a&gt;
&lt;a href="http://www.g2gmart.com" rel="nofollow"&gt;runescape powerleveling&lt;/a&gt;
&lt;a href="http://www.rs-item.com" rel="nofollow"&gt;runescape gold&lt;/a&gt;
&lt;a href="http://www.rs-item.com" rel="nofollow"&gt;runescape items&lt;/a&gt;
&lt;a href="http://www.rs-item.com" rel="nofollow"&gt;runescape money&lt;/a&gt;
&lt;a href="http://www.rs-item.com" rel="nofollow"&gt;runescape accounts&lt;/a&gt;
&lt;a href="http://www.rs-item.com" rel="nofollow"&gt;cheap runescape gold&lt;/a&gt;
&lt;a href="http://www.rs-item.com" rel="nofollow"&gt;cheap runescape money&lt;/a&gt;
&lt;a href="http://www.dofus-items.com" rel="nofollow"&gt;dofus jor&lt;/a&gt;
&lt;a href="http://www.dofus-items.com" rel="nofollow"&gt;dofus gold&lt;/a&gt;
&lt;a href="http://www.dofus-items.com" rel="nofollow"&gt;dofus items&lt;/a&gt;
&lt;a href="http://www.dofus-items.com" rel="nofollow"&gt;dofus guide&lt;/a&gt;
&lt;a href="http://www.dofus-items.com" rel="nofollow"&gt;dofus kamas&lt;/a&gt;
&lt;a href="http://www.dofus-items.com" rel="nofollow"&gt;dofus armes&lt;/a&gt;
&lt;a href="http://www.wow-lvl.com" rel="nofollow"&gt;wow lvl&lt;/a&gt;
&lt;a href="http://www.wow-lvl.com" rel="nofollow"&gt;wow gold&lt;/a&gt;
&lt;a href="http://www.wow-lvl.com" rel="nofollow"&gt;wow items&lt;/a&gt;
&lt;a href="http://www.wow-lvl.com" rel="nofollow"&gt;wow guide&lt;/a&gt;
&lt;a href="http://www.wow-lvl.com" rel="nofollow"&gt;wow quests&lt;/a&gt;
&lt;a href="http://www.wow-lvl.com" rel="nofollow"&gt;wow money&lt;/a&gt;
&lt;a href="http://www.wow-lvl.com" rel="nofollow"&gt;wow accounts&lt;/a&gt;
&lt;a href="http://www.wow-lvl.com" rel="nofollow"&gt;wow powerleveling&lt;/a&gt;
&lt;a href="http://www.wow-lvl.com" rel="nofollow"&gt;wow power leveling&lt;/a&gt;
 please contact with our customer service with on-line chat or add our Email,we will stock it for you in a short time after you told us what you needed.&lt;/p&gt;</description>
      <pubDate>Tue, 24 Jun 2008 11:46:32 +0200</pubDate>
      <guid isPermaLink="false">urn:uuid:5a5cb9a8-9b63-401a-949a-35c0391f5320</guid>
      <link>http://www.degrunt.org/articles/2008/06/06/getting-a-lua-program-onto-the-nxt#comment-76018</link>
    </item>
  </channel>
</rss>
