<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="/stylesheets/rss.css" type="text/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>Juju: ruby-serialport/nxt on Windows</title>
    <link>http://juju.org/articles/2006/08/16/ruby-serialport-nxt-on-windows</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>Sufficiently Advanced Technology</description>
    <item>
      <title>ruby-serialport/nxt on Windows</title>
      <description>&lt;p&gt;My MacBookPro has been acting up (randomly deciding not to boot) So I sent it back to Apple for repairs.  In the meantime, I've been stuck in Windows which has kept me from working on &lt;a href="http://juju.org/articles/2006/08/06/ruby-nxt"&gt;ruby-nxt&lt;/a&gt; because the ruby-serialport module requires compilation.  This is not an easy thing to accomplish in Windows.  I tried in vain to get it to compile using the free MSVC++ Express version.  Apparently MSVC++ version 6 is required.  However, I did manage to get it working using &lt;a href="http://www.cygwin.com/"&gt;Cygwin&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Cygwin is a Linux-like environment for Windows.  It's a little confusing to install and just plain feels weird, but it gets the job done.  Basically when you install Cygwin, navigate down the tree of packages and install the following under Devel: gcc, make, and ruby.  Add c:\cygwin\bin to your path.  The ruby that comes with cygwin is slightly borked.  It sets RUBYOPT=-rubygems for some reason.  So make sure you "SET RUBYOPT=" to clear that out.  Then download &lt;a href="http://raa.ruby-lang.org/project/ruby-serialport/"&gt;ruby-serialport&lt;/a&gt; and install it normally. (ruby extconf.rb, make, make install)&lt;/p&gt;

&lt;p&gt;Now, when you pair your NXT via bluetooth, it should have created a COM4 Outgoing port on NXT 'Dev B'.  Cygwin emulates the windows com ports to virtual /dev devices.  COM1 = /dev/ttyS0.  So in my case, the NXT is on COM4 therefore in ruby-nxt you want to connect to /dev/ttyS3.&lt;/p&gt;

&lt;p&gt;During this whole fiasco I came this close to wiping this computer and installing Linux on it.  Man I miss my MacBook...&lt;/p&gt;</description>
      <pubDate>Wed, 16 Aug 2006 22:34:00 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:978455ab-6411-4548-b0b9-26c29741e3be</guid>
      <author>Tony Buser</author>
      <link>http://juju.org/articles/2006/08/16/ruby-serialport-nxt-on-windows</link>
      <category>Mindstorms</category>
      <category>Code</category>
      <category>windows</category>
      <category>cygwin</category>
      <category>nxt</category>
      <category>mindstorms</category>
      <category>robots</category>
      <category>ruby</category>
      <trackback:ping>http://juju.org/articles/trackback/477</trackback:ping>
    </item>
  </channel>
</rss>
