<?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</title>
    <link>http://www.degrunt.org/</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>lego, mindstorms, technics, pneumatic</description>
    <item>
      <title>NXT / pbLua dump screen to XPM</title>
      <description>&lt;p&gt;With very little effort one can change the function DumpDisplay from the tutorial to a DumpDisplayToXPM, which will create a human-readable as well as computer readable file.&lt;/p&gt;


&lt;pre&gt;
/* XPM */
static char *xpm_[] = {
"100 64 2 1",
"* c #000000",
". c #ffffff",
"....................................................................................................",
"....................................................................................................",
"....................................................................................................",
"....................................................................................................",
"....................................................................................................",
"....................................................................................................",
"....................................................................................................",
"....................................................................................................",
"....................................................................................................",
"....................................................................................................",
"....................................................................................................",
"....................................................................................................",
"....................................................................................................",
"....................................................................................................",
"....................................................................................................",
"....................................................................................................",
"....................................................................................................",
"....................................................................................................",
"....................................................................................................",
"....................................................................................................",
"....................................................................................................",
"....................................................................................................",
"....................................................................................................",
"....................................................................................................",
"....................................................................................................",
"....................................................................................................",
"....................................................................................................",
"....................................................................................................",
"....................................................................................................",
"....................................................................................................",
"....................................................................................................",
"....................................................................................................",
"....................................................................................................",
"....................................................................................................",
"....................................................................................................",
"....................................................................................................",
"....................................................................................................",
"....................................................................................................",
"....................................................................................................",
"....................................................................................................",
"....................................................................................................",
"....................................................................................................",
"....................................................................................................",
"....................................................................................................",
"....................................................................................................",
"....................................................................................................",
"....................................................................................................",
"....................................................................................................",
"....................................................................................................",
"....................................................................................................",
"....................................................................................................",
"....................................................................................................",
"....................................................................................................",
"....................................................................................................",
"....................................................................................................",
"....................................................................................................",
"......*.....*.......................****.........*..................*...*****.*.....................",
"......*.....*.......................*...*........*.................**...*.....*.....................",
"****..*.**..*.....*...*..***........*...*..***..***....***..........*...****..*.**..................",
"*...*.**..*.*.....*...*.....*.......****..*...*..*........*.........*.......*.**..*.................",
"****..*...*.*.....*...*..****.......*...*.*****..*.....****.........*.......*.*...*.................",
"*.....*...*.*.....*..**.*...*.......*...*.*......*..*.*...*.........*...*...*.*...*.................",
"*.....****..*****..**.*..****.......****...***....**...****........***...***..****..................",
"....................................................................................................",
};
&lt;/pre&gt;

	&lt;p&gt;Using &lt;a href="http://www.pixelmator.com/"&gt;PixelMator&lt;/a&gt; this can easily be translated to &lt;span class="caps"&gt;PNG&lt;/span&gt;:&lt;/p&gt;


	&lt;p&gt;&lt;img src="http://degrunt.org/files/nxtscreen.png" alt="" /&gt;&lt;/p&gt;


	&lt;p&gt;Here&amp;#8217;s the function:&lt;/p&gt;


&lt;pre&gt;
function DumpDisplayToXPM()
  print("/* XPM */")
  print("static char *xpm_[] = {")
  print("\"100 64 2 1\",")
  print("\"* c #000000\",")
  print("\". c #ffffff\",")
  for y=0,63 do
    s = "" 
    for x=0,99 do
      if 0 ~= nxt.DisplayGetPixel(x,y) then
        s = s .. "*" 
       else
        s = s .. "." 
      end
    end
    print( "\"" .. s .. "\"," )
  end
  print("};")
end
&lt;/pre&gt;

	&lt;p&gt;Currently this function outputs to the console, which is fine for our purpose, so we can copy and paste it over to our computer.&lt;/p&gt;


	&lt;p&gt;As said earlier, I&amp;#8217;m using &lt;a href="http://code.google.com/p/macvim/"&gt;MacVim&lt;/a&gt; which supports &lt;span class="caps"&gt;XPM&lt;/span&gt; natively.&lt;/p&gt;</description>
      <pubDate>Sat, 07 Jun 2008 12:11:53 +0200</pubDate>
      <guid isPermaLink="false">urn:uuid:9e72e95c-af11-43f1-90e4-15c51b625bd3</guid>
      <author>Tom</author>
      <link>http://www.degrunt.org/articles/2008/06/07/nxt-pblua-dump-screen-to-xpm</link>
    </item>
    <item>
      <title>XPM / XPiXMap and pbLua / NXT</title>
      <description>&lt;p&gt;Well, while I was at it tonight, I found that the text-based interface of pbLua isn&amp;#8217;t very user friendly in comparison to the default &lt;span class="caps"&gt;LEGO NXT&lt;/span&gt; interface with it&amp;#8217;s nice icons. Not that we need icons of course, but they&amp;#8217;re cool. ;)&lt;/p&gt;


	&lt;p&gt;So I wrote a Lua class which can open &lt;a href="http://en.wikipedia.org/wiki/X_PixMap"&gt;&lt;span class="caps"&gt;XPM&lt;/span&gt;&lt;/a&gt; images, which are stored on the FileSystem and show them anywhere on the &lt;span class="caps"&gt;NXT&lt;/span&gt;-screen.&lt;/p&gt;


&lt;span class="caps"&gt;XPM&lt;/span&gt; images are also textbased, very ideal for our purpose, albeit they don&amp;#8217;t have a very small footprint (the below image is 160 bytes, so it&amp;#8217;s also not &lt;span class="caps"&gt;TOO&lt;/span&gt; big):
&lt;pre&gt;
! XPM2
16 7 2 1
* c #ffffff
. c #000000
**..*...........
*.*.*...........
**..*..**.**..**
*.*.*.*.*.*..*.*
**..*..**.*...**
...............*
.............**.
&lt;/pre&gt;

	&lt;p&gt;Luckily MacVim understands this format and allows you to see it:
&lt;img src="http://degrunt.org/files/Picture_1.png" alt="" /&gt;&lt;/p&gt;


	&lt;p&gt;Right now this image is on my &lt;span class="caps"&gt;NXT&lt;/span&gt; display &amp;#8211; inverse though, next is making the parsing a bit more flexible.&lt;/p&gt;


	&lt;p&gt;A good thing is that &lt;a href="http://www.pixelmator.com/"&gt;PixelMator&lt;/a&gt; can convert to &lt;span class="caps"&gt;XPM&lt;/span&gt;, so no manual editing of &lt;span class="caps"&gt;XPM&lt;/span&gt; files ;)&lt;/p&gt;


	&lt;p&gt;Now to see whether we can get the below image to show on the &lt;span class="caps"&gt;NXT&lt;/span&gt; screen (nope no colors):&lt;/p&gt;


	&lt;p&gt;&lt;img src="http://degrunt.org/files/pblua.png" alt="" /&gt;&lt;/p&gt;</description>
      <pubDate>Sat, 07 Jun 2008 01:05:00 +0200</pubDate>
      <guid isPermaLink="false">urn:uuid:0941514d-74aa-4e5d-a5e7-3bd9ebe0a820</guid>
      <author>Tom</author>
      <link>http://www.degrunt.org/articles/2008/06/07/xpm-xpixmap-and-pblua-nxt</link>
      <category>mindstorms</category>
      <category>nxt</category>
      <category>programming</category>
    </item>
    <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>Lua on LEGO Mindstorm NXT</title>
      <description>&lt;p&gt;Wow! It&amp;#8217;s been a long time since I wrote here, but in the mean time cool things have happened. Firstly there&amp;#8217;s &lt;a href="http://www.hempeldesigngroup.com/lego/pbLua/"&gt;pbLua&lt;/a&gt;, secondly I bought myself a Lua book.&lt;/p&gt;


	&lt;p&gt;So, how now do you go about to install pbLua on your &lt;span class="caps"&gt;NXT&lt;/span&gt;? If you&amp;#8217;re using Windows, there&amp;#8217;s not really an issue, because that&amp;#8217;s all explained on the homepage. I&amp;#8217;m using a Mac, so here it is.&lt;/p&gt;


	&lt;h1&gt;Setup&lt;/h1&gt;


	&lt;p&gt;1) First download pbLua, I&amp;#8217;ve got a &amp;#8216;nxt-lua-beta-15b&amp;#8217; folder on my Desktop.&lt;/p&gt;


	&lt;p&gt;2) Start up &lt;span class="caps"&gt;LEGO&lt;/span&gt;&amp;#8217;s &lt;span class="caps"&gt;MINDSTORMS NXT&lt;/span&gt;&lt;/p&gt;


	&lt;p&gt;3) Use the Tools menu and use the &amp;#8220;Update &lt;span class="caps"&gt;NXT&lt;/span&gt; Firmware&amp;#8230;&amp;#8221; option, click &amp;#8220;Browse&amp;#8221; and navigate using the browser to the folder  &amp;#8216;nxt-lua-beta-15b&amp;#8217; on your Desktop. The window should show &amp;#8220;nxt-lua&amp;#8221; as &amp;#8220;Available Firmware Files&amp;#8221;.&lt;/p&gt;


	&lt;p&gt;4) Now connect your &lt;span class="caps"&gt;NXT&lt;/span&gt;, click &amp;#8220;Download&amp;#8221; and wait &amp;#8230;.&lt;/p&gt;


	&lt;p&gt;5) If everything is correct, your &lt;span class="caps"&gt;NXT&lt;/span&gt; screen should show &amp;#8220;pbLua Beta 15b&amp;#8221;, the 15b depends on the version you downloaded.&lt;/p&gt;


	&lt;h1&gt;Okay now what?&lt;/h1&gt;


	&lt;p&gt;Now you&amp;#8217;ve got a Lua-enabled &lt;span class="caps"&gt;NXT&lt;/span&gt;, but it&amp;#8217;s not very clear how to continue further. Luckily it says &lt;a href="http://www.hempeldesigngroup.com/lego/pbLua/pbLuaStartupDisplay.html"&gt;somewhere on the homepage&lt;/a&gt; that there&amp;#8217;s a &lt;span class="caps"&gt;USB&lt;/span&gt; Console as well as a BT (BlueTooth) Console. 
Let&amp;#8217;s start with the &lt;span class="caps"&gt;USB&lt;/span&gt; Console.&lt;/p&gt;


	&lt;p&gt;1) Fire up Terminal.app&lt;/p&gt;


	&lt;p&gt;2) Do an &lt;code&gt;ls /dev/tty.usb*&lt;/code&gt;, in my case this shows a &lt;code&gt;/dev/tty.usbmodem1a21&lt;/code&gt;, but your results may vary.&lt;/p&gt;


3) Then do a &lt;code&gt;screen /dev/tty.usbmodem1a21&lt;/code&gt;, this should refresh your screen and show you:
&lt;pre&gt;
pbLua Beta 15b
&amp;gt; 
&lt;/pre&gt;

	&lt;p&gt;You&amp;#8217;re now in a Lua interpreter, type &lt;code&gt;print("Hello World!")&lt;/code&gt;, just for the kicks of it!&lt;/p&gt;


	&lt;p&gt;Basically you can now use the &lt;a href="http://www.hempeldesigngroup.com/lego/pbLua/nxtFunctionDefs.html"&gt;pbLua &lt;span class="caps"&gt;API&lt;/span&gt;&lt;/a&gt;, to do anything you want, try &lt;code&gt;nxt.SoundTone()&lt;/code&gt; for example, woohoo isn&amp;#8217;t that great?!&lt;/p&gt;


	&lt;p&gt;4) To quit the Console type Ctrl-a Ctrl-\.&lt;/p&gt;


	&lt;h1&gt;Enabling Bluetooth&lt;/h1&gt;


	&lt;p&gt;1) Basically you go about as you would connect any other Bluetooth device to your Mac, just select &amp;#8220;Any Device&amp;#8221;, find the &lt;span class="caps"&gt;NXT&lt;/span&gt; in the list of Devices and have the &amp;#8220;Use a specific passkey&amp;#8221; option selected for the Passkey Options.&lt;/p&gt;


	&lt;p&gt;2) During &amp;#8220;Gathering information about your device&amp;#8221; and while it&amp;#8217;s connecting, Mac &lt;span class="caps"&gt;OSX&lt;/span&gt; will ask you for a passkey, think of something, then go to your &lt;span class="caps"&gt;USB&lt;/span&gt; console and use the Lua function &lt;code&gt;nxt.BtSetPIN('something')&lt;/code&gt; (on your &lt;span class="caps"&gt;USB&lt;/span&gt; console) to confirm the bluetooth-passkey from your &lt;span class="caps"&gt;NXT&lt;/span&gt; end.
At some point Mac &lt;span class="caps"&gt;OSX&lt;/span&gt; will say &amp;#8220;Connected&amp;#8221;. Remember the device name!&lt;/p&gt;


	&lt;h1&gt;Bluetooth Console&lt;/h1&gt;


	&lt;p&gt;1) Reboot your &lt;span class="caps"&gt;NXT&lt;/span&gt; (by holding the grey button for some time) and start it again by clicking the orange button. Then you should see something like:&lt;/p&gt;


&lt;pre class="nxtDisplay"&gt;
USB Console
BT Console
. 
. 
. 
. 
. 
. 
00000 Button:0
&lt;/pre&gt;

	&lt;p&gt;Then use the dark grey button, to highlight BT Console, next use the arrow buttons to find the device name of your computer (which in my case is &amp;#8216;galactica&amp;#8217;).&lt;/p&gt;


&lt;pre class="nxtDisplay"&gt;
USB Console
BT Console
. 
.
galactica
AD:000000000000
CL:000000
ST:00 Idx: 00 
00000 Button:0
&lt;/pre&gt;

	&lt;p&gt;Once you&amp;#8217;ve got this selected, the screen should show:&lt;/p&gt;


&lt;pre class="nxtDisplay"&gt;
Wait for connect
Active: 00
Update:  0 
.
.
.
.
.
.
&lt;/pre&gt;

	&lt;p&gt;2) Fire up Terminal.app&lt;/p&gt;


	&lt;p&gt;3) Do an &lt;code&gt;ls /dev/cu.&amp;lt;bluetooth-device-name&amp;gt;*&lt;/code&gt;, in my case my &lt;span class="caps"&gt;NXT&lt;/span&gt; is called &amp;#8220;r2d2&amp;#8221; (yup!). So I did a &lt;code&gt;ls /dev/cu.r2d2*&lt;/code&gt;, this shows a &lt;code&gt;/dev/cu.r2d2-DevB-1&lt;/code&gt;, but your results may vary, depending on your device name.&lt;/p&gt;


3) Then do a &lt;code&gt;screen /dev/cu.r2d2-DevB-1&lt;/code&gt; (or whatever you found at step 2), this should refresh your screen and show you:
&lt;pre&gt;
pbLua Beta 15b
&amp;gt; 
&lt;/pre&gt;

	&lt;p&gt;Woohoo, wireless pbLua!!&lt;/p&gt;


	&lt;p&gt;More to follow, later, keep you posted &amp;#8211; check back!&lt;/p&gt;</description>
      <pubDate>Fri, 06 Jun 2008 00:39:00 +0200</pubDate>
      <guid isPermaLink="false">urn:uuid:00ba9a38-6c38-4f85-aa71-48953c2ec00a</guid>
      <author>Tom</author>
      <link>http://www.degrunt.org/articles/2008/06/06/lua-on-lego-mindstorm-nxt</link>
      <category>mindstorms</category>
      <category>nxt</category>
      <category>programming</category>
      <category>hacking</category>
    </item>
    <item>
      <title>Cross-compile Ruby to ARM7</title>
      <description>&lt;p&gt;Okay, I had another go at cross-compiling Ruby to &lt;span class="caps"&gt;ARM7&lt;/span&gt;, which for me (a cross-compile newbee) is not very simple.&lt;/p&gt;


	&lt;p&gt;I found this site of &lt;a href="http://www.jstuber.net/lego/nxt-programming/arm-toolchain.html"&gt;Jürgen Stuber&lt;/a&gt; which helps a little, but just running &lt;code&gt;./configure --host powerpc-apple-darwin8.8.0 --target=arm-elf&lt;/code&gt; does not seem to do the trick. I also found this &lt;a href="http://www.cpjava.net/arm-ruby.txt"&gt;page by Richard Keene&lt;/a&gt; which also points me in the right direction.&lt;/p&gt;


	&lt;p&gt;Well you will know my intention: Getting Ruby to compile for running the Lego &lt;span class="caps"&gt;NXT&lt;/span&gt; brick. We&amp;#8217;ll probably don&amp;#8217;t need socket, curses and libruby (maybe more), which will safe a lot of space. The next thing is to find out how small we can actually make the interpreter.&lt;/p&gt;


	&lt;p&gt;So does anyone have any tips, can somebody help me out? Is somebody willing to help? I&amp;#8217;m aiming to create a Ruby interpreter, which will run on the &lt;span class="caps"&gt;LEGO NXT&lt;/span&gt; device, which will load zipped .rb files and run&amp;#8217;s them.&lt;/p&gt;</description>
      <pubDate>Sun, 14 Jan 2007 14:28:59 +0100</pubDate>
      <guid isPermaLink="false">urn:uuid:b93aedf5-3756-46a1-9389-06555ae014a7</guid>
      <author>Tom</author>
      <link>http://www.degrunt.org/articles/2007/01/14/cross-compile-ruby-to-arm7</link>
      <category>nxt</category>
      <category>hacking</category>
    </item>
    <item>
      <title>Java OS for LEGO NXT</title>
      <description>&lt;p&gt;They&amp;#8217;ve done it! Just like for the &lt;span class="caps"&gt;RCX&lt;/span&gt; there is now Java for the &lt;span class="caps"&gt;NXT&lt;/span&gt;: &lt;a href="http://lejos.sourceforge.net/"&gt;leJOS&lt;/a&gt; is a firmware replacement for the &lt;span class="caps"&gt;NXT&lt;/span&gt; device. It currently does not  have bluetooth, sound and &lt;span class="caps"&gt;I2C&lt;/span&gt; support. There is also no menu system (yet!). But you can upload Java programs via &lt;span class="caps"&gt;USB&lt;/span&gt; and have your but execute them. Excellent!&lt;/p&gt;


	&lt;p&gt;But as you know I&amp;#8217;m a big Ruby fan, so if only it was Ruby instead of Java &amp;#8230; :)
Also, how can you fit a Ruby interpreter on 256 Kbytes &lt;span class="caps"&gt;FLASH&lt;/span&gt; &amp;#38; 64 Kbytes &lt;span class="caps"&gt;RAM&lt;/span&gt;. I know there is already ruby for 32-bit &lt;span class="caps"&gt;ARM7&lt;/span&gt; microcontrollers so &amp;#8230;&lt;/p&gt;</description>
      <pubDate>Sun, 14 Jan 2007 13:19:34 +0100</pubDate>
      <guid isPermaLink="false">urn:uuid:8a214521-ace0-4304-91d4-54ded53b4591</guid>
      <author>Tom</author>
      <link>http://www.degrunt.org/articles/2007/01/14/java-os-for-lego-nxt</link>
      <category>nxt</category>
      <category>hacking</category>
    </item>
    <item>
      <title>Mac OSX and Lego NXT stuff</title>
      <description>&lt;p&gt;From John Hansen I understood that there&amp;#8217;s nice &lt;span class="caps"&gt;OSX&lt;/span&gt; stuff for your &lt;span class="caps"&gt;LEGO NXT&lt;/span&gt; coming up or already there.&lt;/p&gt;


	&lt;p&gt;The first is a full-blown &lt;span class="caps"&gt;IDE&lt;/span&gt; for use with nbc/nxc called &lt;a href="http://forums.nxtasy.org/index.php?showtopic=719"&gt;NXTCode&lt;/a&gt;  . I must say: it looks good and I hope it&amp;#8217;ll get finished and released.&lt;/p&gt;


	&lt;p&gt;The second is a utility called &lt;a href="http://web.mac.com/carstenm/iWeb/Lego/NXT/F2F73940-D837-4038-9011-2968725A2872.html"&gt;NXTBrowser&lt;/a&gt;. It allows you to browse your &lt;span class="caps"&gt;NXT&lt;/span&gt; with &lt;span class="caps"&gt;OSX&lt;/span&gt;. It&amp;#8217;s a Universal binary so it runs on your &lt;span class="caps"&gt;PPC&lt;/span&gt; as well as your Intel Mac. Good stuff!&lt;/p&gt;</description>
      <pubDate>Thu, 11 Jan 2007 22:27:27 +0100</pubDate>
      <guid isPermaLink="false">urn:uuid:2d9f50b9-1495-4d0a-9ef7-7011e32c5941</guid>
      <author>Tom</author>
      <link>http://www.degrunt.org/articles/2007/01/11/mac-osx-and-lego-nxt-stuff</link>
      <category>nxt</category>
    </item>
    <item>
      <title>Drag &amp;amp; Drop NBC/NXC to RXE</title>
      <description>&lt;p&gt;Yesterday, I&amp;#8217;ve put together Dropnbc2rxe, with the help of &lt;a href="http://www.wsanchez.net/software/"&gt;DropScript&lt;/a&gt;. If you put Dropnbc2rxe in your Applications folder (it &lt;span class="caps"&gt;NEEDS&lt;/span&gt; to be there, due to hardcoded paths). Then if you would drop .nbc or .nxc files onto the application, it will compile them to .rxe files, to be put on your &lt;span class="caps"&gt;LEGO NXT&lt;/span&gt; device.
Dropnbc2rxe can be downloaded &lt;a href="http://www.degrunt.org/media/Dropnbc2rxe.zip"&gt;here&lt;/a&gt;. It has nbc 1.0.1.b20 bundled with it, no need to download that separate.&lt;/p&gt;</description>
      <pubDate>Wed, 10 Jan 2007 22:02:44 +0100</pubDate>
      <guid isPermaLink="false">urn:uuid:4fb8540f-f48c-460f-9e11-f95a30dca98e</guid>
      <author>Tom</author>
      <link>http://www.degrunt.org/articles/2007/01/10/drag-drop-nbc-nxc-to-rxe</link>
      <category>nxt</category>
      <category>hacking</category>
    </item>
    <item>
      <title>Ruby &amp;amp; Mindstorms NXT</title>
      <description>&lt;p&gt;Using &lt;a href="http://www.ruby-lang.org/en/"&gt;Ruby&lt;/a&gt; with your Mindstorms &lt;span class="caps"&gt;NXT&lt;/span&gt; is easy using &lt;a href="http://ruby-nxt.rubyforge.org/"&gt;RubyNXT&lt;/a&gt;. But it still requires a bluetooth connection or &lt;span class="caps"&gt;USB&lt;/span&gt; connection.&lt;/p&gt;


	&lt;p&gt;How cool would it be if it was possible to write a Ruby program, upload it (in sourcecode) to your &lt;span class="caps"&gt;NXT&lt;/span&gt; brick and have a Ruby interpreter firmware running on the &lt;span class="caps"&gt;NXT&lt;/span&gt;? It wouldn&amp;#8217;t be needed to port the whole &lt;a href="http://www.ruby-doc.org/stdlib/"&gt;Ruby Standard Library&lt;/a&gt;, it wouldn&amp;#8217;t even be needed to convert the whole &lt;a href="http://www.ruby-doc.org/core/"&gt;Ruby Core Library&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;So what would be needed to get this to work? Cross-compilation of Ruby to &lt;span class="caps"&gt;ARM&lt;/span&gt;, someone already &lt;a href="http://www.caliban.org/ruby/ruby-zaurus.shtml"&gt;ported Ruby to his Zaurus&lt;/a&gt;. A new firmare is needed.&lt;/p&gt;


	&lt;p&gt;Maybe better yet is the use of a Ruby VM like &lt;a href="http://www.atdot.net/yarv/"&gt;&lt;span class="caps"&gt;YARV&lt;/span&gt;&lt;/a&gt; and get that to run on the Mindstorms brick. Still, that needs to be cross compiled and a new firmware is needed.&lt;/p&gt;


	&lt;p&gt;Ruby is a fully object oriented programming language and is fairly easy to learn, even easier to use. More and more programmers learn Ruby.&lt;/p&gt;</description>
      <pubDate>Sat, 14 Oct 2006 11:29:00 +0200</pubDate>
      <guid isPermaLink="false">urn:uuid:cef68423-5a6c-4e37-99a4-7a2179c6a006</guid>
      <author>Tom</author>
      <link>http://www.degrunt.org/articles/2006/10/14/ruby-mindstorms-nxt</link>
      <category>mindstorms</category>
      <category>nxt</category>
      <category>programming</category>
      <category>hacking</category>
    </item>
    <item>
      <title>8002: Destroyer Droid</title>
      <description>&lt;p&gt;Yesterday I received my 8002: Destroyer Droid and built it. Apparantly the instructions were faulty, because I received a supplement with it. It was quite a hassle to get it correct.&lt;/p&gt;&lt;typo:drkroom photo="53" /&gt;
&lt;typo:drkroom photo="54" /&gt;
&lt;typo:drkroom photo="55" /&gt;
&lt;typo:drkroom photo="56" /&gt;
&lt;typo:drkroom photo="57" /&gt;
&lt;typo:drkroom photo="58" /&gt;</description>
      <pubDate>Fri, 13 Oct 2006 20:13:46 +0200</pubDate>
      <guid isPermaLink="false">urn:uuid:9c444303-3c76-43b2-9b89-a34c1298a3ce</guid>
      <author>Tom</author>
      <link>http://www.degrunt.org/articles/2006/10/13/8002-destroyer-droid</link>
      <category>starwars</category>
      <category>technic</category>
    </item>
  </channel>
</rss>
