<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>robots.net blog for jkkroll</title>
    <link>http://robots.net/person/jkkroll/</link>
    <description>robots.net blog for jkkroll</description>
    <language>en-us</language>
    <generator>mod_virgule</generator>
    <pubDate>Sat, 18 May 2013 11:22:55 GMT</pubDate>
    <item>
      <pubDate>Sun, 25 Mar 2012 23:08:59 GMT</pubDate>
      <title>Digital Gaming Table Quick Prototype</title>
      <link>http://robots.net/person/jkkroll/diary.html?start=47</link>
      <guid>http://robotguy.net/blog/2012/03/25/digital-gaming-table-quick-prototype/?utm_source=rss</guid>
      <description>&lt;p&gt;I&#x2019;ve been fascinated by the digital gaming tables I&#x2019;ve seen on the net for a while now. This weekend I got the bug and decided to see what I could do with just the stuff I had lying around the house. I already had a small Ikea table and ceiling mounted projector up in the loft, so I figured I would try a top-down projection by placing a mirror in the beam path. A quick search out in the garage turned up a donor full-length mirror*. I cut it down to a decent size and proceeded to stand on a chair, holding the mirror in place to get an idea of how it would look.&lt;/p&gt;
&lt;p&gt;It wasn&#x2019;t too bad. Obviously I would eventually need to switch to a front surface mirror because I got quite a bit of ghosting, but the image was usable. Now I just needed a way to hold the mirror in place. Another rummage through the garage and I came back with an Ikea clamp-style goose neck lamp with a teeny burned-out halogen bulb. I knew it was unlikely I&#x2019;d ever get around to replacing the bulb, so the lamp was harvested also**. Here&#x2019;s the result:&lt;/p&gt;
&lt;p&gt;
  &lt;a href="http://robotguy.net/mirror_1.jpg" &gt;
    &lt;img src="http://robotguy.net/tn_mirror_1.jpg"/&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
  &lt;a href="http://robotguy.net/mirror_2.jpg" &gt;
    &lt;img src="http://robotguy.net/tn_mirror_2.jpg"/&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
  &lt;a href="http://robotguy.net/mirror_3.jpg" &gt;
    &lt;img src="http://robotguy.net/tn_mirror_3.jpg"/&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
  &lt;a href="http://robotguy.net/mirror_4.jpg" &gt;
    &lt;img src="http://robotguy.net/tn_mirror_4.jpg"/&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
  &lt;a href="http://robotguy.net/mirror_5.jpg" &gt;
    &lt;img src="http://robotguy.net/tn_mirror_5.jpg"/&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
  &lt;a href="http://robotguy.net/mirror_6.jpg" &gt;
    &lt;img src="http://robotguy.net/tn_mirror_6.jpg"/&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;I have checked several times to make sure the mirror isn&#x2019;t getting hot, because I don&#x2019;t want the glue to give way and drop the mirror crashing down on the table. No problems so far, it&#x2019;s not even getting warm. Not bad for an hour&#x2019;s worth of prototyping! And when I&#x2019;m done, I can just un-clip the mirror, re-focus the projector and watch movies again.&lt;/p&gt;
&lt;p&gt;*Every time I find something useful out in the garage, it reinforces my pack-rat tendencies. By this point in my life, I think it&#x2019;s hopeless.&lt;/p&gt;
&lt;p&gt;** See? There&#x2019;s another one. Good thing I saved those, instead of getting rid of them!&lt;/p&gt;</description>
    </item>
    <item>
      <pubDate>Fri, 24 Jun 2011 20:05:55 GMT</pubDate>
      <title>Beagle-Book Update</title>
      <link>http://robots.net/person/jkkroll/diary.html?start=46</link>
      <guid>http://robotguy.net/blog/2011/06/24/beagle-book-update/?utm_source=rss</guid>
      <description>&lt;p&gt;Doesn&#x2019;t look a whole lot different, but I&#x2019;ve added a small cooling fan for the DLP and it&#x2019;s been rewired to run from a single 5V@2.6A wall wart (sorry for the shoddy cell-phone pic) :&lt;br/&gt;&lt;a href="http://robotguy.net/beagle_case_4.jpg" &gt;&lt;img src="http://robotguy.net/tn_beagle_case_4.jpg" alt="Case 4"/&gt;&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <pubDate>Fri, 24 Jun 2011 05:06:53 GMT</pubDate>
      <title>Beagle Box</title>
      <link>http://robots.net/person/jkkroll/diary.html?start=45</link>
      <guid>http://robotguy.net/blog/2011/06/23/beagle-box/?utm_source=rss</guid>
      <description>&lt;p&gt;I got a BeagleBoard for Father&#x2019;s Day. My plan is to put the BeagleBoard, the Pico Projector and a battery in a small box, write some ALife software and carry around a virtual world. Tonight I started mounting the board and projector inside a fake book:&lt;br/&gt;&lt;a href="http://robotguy.net/beagle_case_1.jpg" &gt;&lt;img src="http://robotguy.net/tn_beagle_case_1.jpg" alt="Case 1"/&gt;&lt;/a&gt;&lt;br/&gt;&lt;a href="http://robotguy.net/beagle_case_2.jpg" &gt;&lt;img src="http://robotguy.net/tn_beagle_case_2.jpg" alt="Case 1"/&gt;&lt;/a&gt;&lt;br/&gt;&lt;a href="http://robotguy.net/beagle_case_3.jpg" &gt;&lt;img src="http://robotguy.net/tn_beagle_case_3.jpg" alt="Case 1"/&gt;&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <pubDate>Thu, 26 May 2011 23:09:44 GMT</pubDate>
      <title>Simple Embedded Architecture for Robot Learning and Emotion</title>
      <link>http://robots.net/person/jkkroll/diary.html?start=44</link>
      <guid>http://robotguy.net/blog/2011/05/25/simple-embedded-architecture-for-robot-learning-and-emotion/</guid>
      <description>&lt;p&gt;I&#x2019;ve been working on a paper about robot learning for over a year now, more as a place to organize my thoughts than anything else. This paper outlines some ideas I&#x2019;ve been having about how to implement a learning system that let&#x2019;s a robot relate state-action sequences to a result. It&#x2019;s still extremely sketchy, but I thought I&#x2019;d make it public:&lt;br/&gt;&lt;a href="https://docs.google.com/document/pub?id=1EhNtQPCn0M4jGueseuvHR0DMIo4nUFPI3hlmjQwUDSs" &gt;Simple Embedded Architecture for Robot Learning and Emotion&lt;/a&gt;&lt;br/&gt;
Sorry for the shoddy formatting, but that results from publishing a Google Doc as HTML.&lt;/p&gt;
&lt;p&gt;I also have a few background documents that may be interesting* to some:&lt;/p&gt;
&lt;p&gt;
  &lt;a href="https://spreadsheets.google.com/spreadsheet/pub?hl=en_US&amp;amp;hl=en_US&amp;amp;key=0AvbgU50_SSCadENmaW1qVmF3VGdZQU8wOWtkNHBaSGc&amp;amp;output=html" &gt;Senses/States Matrix&lt;/a&gt;
  &lt;br/&gt;&lt;a href="https://spreadsheets0.google.com/spreadsheet/pub?hl=en_US&amp;amp;hl=en_US&amp;amp;key=0AvbgU50_SSCadFhPbno3RU9pX3EyTzMtQmZBMi1xQVE&amp;amp;output=html" &gt;Emotional Effects on Outputs&lt;/a&gt;
  &lt;br/&gt;&lt;a href="https://spreadsheets1.google.com/spreadsheet/pub?hl=en_US&amp;amp;hl=en_US&amp;amp;key=0AvbgU50_SSCacFNPTDN6LUxmcjBwcFZVNGcteVJCQ1E&amp;amp;output=html" &gt;Robot Emotions versus Movements&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;My current mental obsession is an ALife simulation running under Linux, and I thought I would try out this learning architecture in a simulated environment on a capable processor.&lt;/p&gt;
&lt;p&gt;*I find this stuff extremely interesting, but then according to my teenage daughters I&#x2019;m &lt;em&gt;weird&lt;/em&gt;. Of course they think weird is a compliment.&lt;/p&gt;</description>
    </item>
    <item>
      <pubDate>Mon, 10 Jan 2011 17:12:21 GMT</pubDate>
      <title>Photo Competition</title>
      <link>http://robots.net/person/jkkroll/diary.html?start=43</link>
      <guid>http://robotguy.net/blog/2011/01/10/photo-competition/</guid>
      <description>&lt;table cellspacing="0" cellpadding="0" border="0"&gt;
&lt;tr&gt;
&lt;td align="left"&gt;
&lt;div style="background-color:rgb(134, 134, 134);padding:1px"&gt;
&lt;div style="background-color:rgb(185, 185, 185);padding:1px"&gt;
&lt;div style="background-color:rgb(221, 221, 221);padding:1px"&gt;
&lt;div style="background-color:rgb(255, 255, 255);padding:1px"&gt;
&lt;table cellspacing="0" cellpadding="0" border="0" style="text-decoration:none;font-family:Verdana,Arial,Sans-Serif;font-size:10px;font-style:normal;color:black"&gt;
&lt;tr&gt;
&lt;td colspan="2" align="right"&gt;
&lt;div style="float:right"&gt;&lt;a href="http://www.brickfish.com?=PP_BFLogo_589" style="text-decoration:none;font-family:Verdana,Arial,Sans-Serif;font-size:12px;background-color:white;font-style:normal" target="_blank" &gt;&lt;img src="http://brickfish.com/Media/Images/Propagation/6.0/pbb.jpg" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td colspan="2" align="center" valign="middle" style="background-color:rgb(255, 255, 255);padding:0px"&gt;&lt;center&gt;&lt;object width="300" height="300" id="PropShell" align="middle"&gt;&lt;param name="movie" value="http://www.brickfish.com/FlashServices/GetPropSWF.frss?contentcode=3_7355488_0_103_-1_589&amp;#038;swfv=6&amp;#038;isfull=0&amp;#038;forlabel=0&amp;#038;htid=00df2ba5-7344-491a-aefd-6333ac7488ae&amp;#038;ispreview=0&amp;#038;phtid=00000000-0000-0000-0000-000000000000&amp;#038;pbapi=4579247&amp;#038;pbvi=230909164&amp;#038;stgw=300&amp;#038;stgh=300&amp;#038;sitedom=www.brickfish.com&amp;#038;autoplay=0&amp;#038;lcid=1033" /&gt;&lt;param name="quality" value="high" /&gt;&lt;param name="bgcolor" value="#FFFFFF" /&gt;&lt;param name="WMode" value="Transparent" /&gt;&lt;embed src="http://www.brickfish.com/FlashServices/GetPropSWF.frss?contentcode=3_7355488_0_103_-1_589&amp;#038;swfv=6&amp;#038;isfull=0&amp;#038;forlabel=0&amp;#038;htid=00df2ba5-7344-491a-aefd-6333ac7488ae&amp;#038;ispreview=0&amp;#038;phtid=00000000-0000-0000-0000-000000000000&amp;#038;pbapi=4579247&amp;#038;pbvi=230909164&amp;#038;stgw=300&amp;#038;stgh=300&amp;#038;sitedom=www.brickfish.com&amp;#038;autoplay=0&amp;#038;lcid=1033" quality="high" width="300" height="300" name="PropShell" align="middle" type="application/x-shockwave-flash" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" bgcolor="#FFFFFF" &gt;&lt;/embed&gt;&lt;/object&gt;&lt;/center&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td colspan="2"&gt;&lt;a href="http://www.brickfish.com/Lifestyles/MyFavoritePhoto3?=EP_589&amp;#038;tab=1" style="text-decoration:none;font-family:Verdana,Arial,Sans-Serif;font-size:10px;background-color:white;font-style:normal" target="_blank" &gt;My Favorite Photo (I&amp;#8217;ve Ever Taken) 3&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.brickfish.com" style="text-decoration:none;font-family:Verdana,Arial,Sans-Serif;font-size:12px;background-color:white;font-style:normal" target="_blank" &gt;Brickfish&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;table cellspacing="0" cellpadding="0" border="0"&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="http://www.brickfish.com/Pages/Contests/VoteConfirmation.aspx?qsi=53950581" style="text-decoration:none;font-family:Verdana,Arial,Sans-Serif;font-size:12px;background-color:white;font-style:normal" target="_blank" &gt;&lt;img src="http://brickfish.com/Media/Images/Propagation/6.0/vote.jpg" border="0"&gt;&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="http://www.brickfish.com/Pages/PropagationMain.frss?qsi=53969312" style="text-decoration:none;font-family:Verdana,Arial,Sans-Serif;font-size:12px;background-color:white;font-style:normal" target="_blank" &gt;&lt;img src="http://brickfish.com/Media/Images/Propagation/6.0/share.jpg" border="0"&gt;&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="http://www.brickfish.com/FlashServices/ClickToContent.frss?qsi=53969311" style="text-decoration:none;font-family:Verdana,Arial,Sans-Serif;font-size:12px;background-color:white;font-style:normal" target="_blank" &gt;&lt;img src="http://brickfish.com/Media/Images/Propagation/6.0/view.jpg" border="0"&gt;&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;/td&gt;
&lt;td align="right" valign="top" style='padding-top:4px'&gt;&lt;a href="http://www.brickfish.com?=PP_SPLogo_589" target="_blank" &gt;&lt;img src="http://brickfish.com/Media/Images/Propagation/6.0/bflogo.jpg" border="0"&gt;&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
</description>
    </item>
    <item>
      <pubDate>Sun, 19 Dec 2010 07:13:51 GMT</pubDate>
      <title>Something useless for xmas</title>
      <link>http://robots.net/person/jkkroll/diary.html?start=42</link>
      <guid>http://robotguy.net/blog/2010/12/18/something-useless-for-xmas/</guid>
      <description>&lt;p&gt;I needed a ~$5 gift for family xmas this year, and was at a loss. Then I remembered the &lt;a href="http://blog.makezine.com/archive/2010/01/leave_me_alone_box.html" target="_blank" &gt;Useless Machine from Make&lt;/a&gt;, also known as a &amp;#8220;Leave Me Alone Box.&amp;#8221; &#xA0;I had a $5 box from the thrift store, a smaller version of the one I used for my &lt;a href="http://robotguy.net/blog/2010/06/21/portable-electrick-storage-device-mark-i/" target="_blank" &gt;iPad Charger&lt;/a&gt;. &#xA0;After a lot of planning in AutoCAD and even more trial and error I came up with this:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://robotguy.net/useless_2.jpg" &gt;&lt;img class="alignnone" title="Useless Machine" src="http://robotguy.net/tn_useless_2.jpg" alt="" width="150" height="133" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It took me a while to figure out how to put it together with the cam attached to the lid, and my daughter suggested a rod &amp;amp; tube setup:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://robotguy.net/useless_4.jpg" &gt;&lt;img class="alignnone" title="Rod &amp;amp; Tube" src="http://robotguy.net/tn_useless_4.jpg" alt="" width="150" height="128" /&gt;&lt;/a&gt;&lt;a href="http://robotguy.net/useless_5.jpg" &gt;&lt;img class="alignnone" title="Hinge" src="http://robotguy.net/tn_useless_5.jpg" alt="" width="114" height="150" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The cam is connected to the lid through a bearing and a brass &amp;#8220;bicycle fork&amp;#8221;:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://robotguy.net/useless_6.jpg" &gt;&lt;img class="alignnone" title="Bicycle Fork" src="http://robotguy.net/tn_useless_6.jpg" alt="" width="128" height="150" /&gt;&lt;/a&gt;&lt;a href="http://robotguy.net/useless_7.jpg" &gt;&lt;img class="alignnone" title="Bearing" src="http://robotguy.net/tn_useless_7.jpg" alt="" width="116" height="150" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;When the cam spins, it lifts the lid enough for the arm to come out and flip the switch.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://robotguy.net/useless_8.jpg" &gt;&lt;img class="alignnone" title="Turning itself off" src="http://robotguy.net/tn_useless_8.jpg" alt="" width="150" height="146" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;One thing that I did slightly different was use a 5V DPDT relay to reverse the motor instead of a DPDT &#xA0;switch. This allowed me to use a SPDT switch with a lower actuation force.&lt;/p&gt;
</description>
    </item>
    <item>
      <pubDate>Tue, 24 Aug 2010 21:14:07 GMT</pubDate>
      <title>Perl for Puzzlers</title>
      <link>http://robots.net/person/jkkroll/diary.html?start=41</link>
      <guid>http://robotguy.net/blog/2010/08/24/perl-for-puzzlers/</guid>
      <description>&lt;p&gt;I was working on creating a puzzle a couple of weeks ago and needed sets of a dozen 5-letter words that all &amp;#8220;interacted&amp;#8221; in a certain way (sorry, don&amp;#8217;t want to give away too much). &#xA0;One of the software guys here at work suggested a Perl script to find sets words, specifically &lt;a title="Strawberry Perl Home Page" href="http://strawberryperl.com/" target="_blank" &gt;Strawberry Perl&lt;/a&gt;. I have been programming since I was a kid (basic on a VIC-20) but lately have been resistant to learning new languages because I can usually accomplish my goals with the languages I already know. This time I decided to take his advice and was pleasantly surprised with the simple learning curve and thought I&amp;#8217;d pass on a bit of intro on how to set up and start using Perl to help create puzzles.&lt;/p&gt;
&lt;p&gt;&lt;span id="more-129"&gt;&lt;/span&gt;Disclaimer:&lt;/p&gt;
&lt;p&gt;I am not a Computer Scientist, nor do I play one on TV. This is a description of how I went about solving a specific problem, not necessarily the best method. For informational purposes only. Use at your own risk.&lt;/p&gt;
&lt;p&gt;Installation of Strawberry Perl was completely straightforward on my XP machine. I haven&amp;#8217;t tried any Win7 installs, but the home page suggests it is just as simple. I just downloaded the Windows installer and let it run. This will install Perl on your machine let you run scripts from the command line.&lt;/p&gt;
&lt;p&gt;1. Create a folder to place all of my code and research material.&lt;/p&gt;
&lt;p&gt;2. &#xA0;Create a text file in the folder where I had all of my puzzle related info called &amp;#8220;&lt;a href="robotguy.net/puzzles/prompt.bat" &gt;prompt.bat&lt;/a&gt;&amp;#8221; (no quotes), and consisted of the single word &amp;#8220;cmd&amp;#8221; (again no quotes). Double-clicking this file will open a command prompt within the folder so you can launch the scripts easily.&lt;/p&gt;
&lt;p&gt;3. Download a word list that can be easily read into your script. I used output from &lt;a href="http://www.crosswordman.com/tea.html" target="_blank" &gt;Tea&lt;/a&gt;, but I also found some other word lists here: &lt;a href="http://wordlist.sourceforge.net/" &gt;http://wordlist.sourceforge.net/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;4. Create a text file (I prefer Notepad++ for text editing. Be sure to set the Language to Perl to get the correct syntax&#xA0;hi lighting) with the name of the puzzle and a &amp;#8220;.pl&amp;#8221; suffix. This file will be your Perl Script.&lt;/p&gt;
&lt;p&gt;5. Start the script with &amp;#8220;&lt;strong&gt;#!/usr/bin/perl&lt;/strong&gt;&amp;#8221; This tells the computer that it is a Perl script.&lt;/p&gt;
&lt;p&gt;6. Here&amp;#8217;s a script I wrote to find all the rotations of a word (anyone who saw my &lt;a href="http://forum.puzzalot.com/index.php/topic,50.0.html" target="_blank" &gt;sample puzzle on the forum&lt;/a&gt; may&#xA0;recognize&#xA0;this) &lt;a href="http://robotguy.net/puzzles/listrotator.pl" target="_blank" &gt;listrotator.pl&lt;/a&gt; (Save target as&amp;#8230; or you may get an error. No idea why). You can run this by typing &amp;#8220;perl listrotator.pl words.txt&amp;#8221; at the command prompt.&lt;/p&gt;
&lt;blockquote&gt;
&lt;div id="_mcePaste"&gt;&lt;strong&gt;#!/usr/bin/perl&lt;/strong&gt;&lt;/div&gt;
&lt;div id="_mcePaste"&gt;&lt;strong&gt;#use strict;&lt;/strong&gt;&lt;/div&gt;
&lt;div id="_mcePaste"&gt;&lt;strong&gt;my %words;&lt;/strong&gt;&lt;/div&gt;
&lt;div id="_mcePaste"&gt;&lt;strong&gt;my $i;&lt;/strong&gt;&lt;/div&gt;
&lt;div id="_mcePaste"&gt;&lt;strong&gt;open(DATAIN,&amp;#8221;&amp;lt;$ARGV[0]&amp;#8220;) || die &amp;#8220;cannot open \&amp;#8221;$ARGV[0]\&amp;#8221;: $!&amp;#8221;;&lt;/strong&gt;&lt;/div&gt;
&lt;div id="_mcePaste"&gt;&lt;strong&gt;while(my $line = &amp;lt;DATAIN&amp;gt;){&lt;/strong&gt;&lt;/div&gt;
&lt;div id="_mcePaste"&gt;&lt;strong&gt;$line =~ s/\s+//;&lt;/strong&gt;&lt;/div&gt;
&lt;div id="_mcePaste"&gt;&lt;strong&gt;$words{$line} = 1;&lt;/strong&gt;&lt;/div&gt;
&lt;div id="_mcePaste"&gt;&lt;strong&gt;}&lt;/strong&gt;&lt;/div&gt;
&lt;div id="_mcePaste"&gt;&lt;strong&gt;foreach my $word1 (sort keys %words){&lt;/strong&gt;&lt;/div&gt;
&lt;div id="_mcePaste"&gt;&lt;strong&gt;my $num=0;&lt;/strong&gt;&lt;/div&gt;
&lt;div id="_mcePaste"&gt;&lt;strong&gt;my $word=$word1;&lt;/strong&gt;&lt;/div&gt;
&lt;div id="_mcePaste"&gt;&lt;strong&gt;print &amp;#8220;-$word\n&amp;#8221;;&lt;/strong&gt;&lt;/div&gt;
&lt;div id="_mcePaste"&gt;&lt;strong&gt;for($i = 1; $i &amp;lt; length($word1); $i++){&lt;/strong&gt;&lt;/div&gt;
&lt;div id="_mcePaste"&gt;&lt;strong&gt;$word= rotate($word);&lt;/strong&gt;&lt;/div&gt;
&lt;div id="_mcePaste"&gt;&lt;strong&gt;print &amp;#8220;$word\n&amp;#8221;;&lt;/strong&gt;&lt;/div&gt;
&lt;div id="_mcePaste"&gt;&lt;strong&gt;}&lt;/strong&gt;&lt;/div&gt;
&lt;div id="_mcePaste"&gt;&lt;strong&gt;}&lt;/strong&gt;&lt;/div&gt;
&lt;div id="_mcePaste"&gt;&lt;strong&gt;sub rotate{&lt;/strong&gt;&lt;/div&gt;
&lt;div id="_mcePaste"&gt;&lt;strong&gt;my $foo=shift;&lt;/strong&gt;&lt;/div&gt;
&lt;div id="_mcePaste"&gt;&lt;strong&gt;chomp($foo);&lt;/strong&gt;&lt;/div&gt;
&lt;div id="_mcePaste"&gt;&lt;strong&gt;my $out=substr($foo,1,length($foo)-1).substr($foo,0,1);&lt;/strong&gt;&lt;/div&gt;
&lt;div id="_mcePaste"&gt;&lt;strong&gt;return $out;&lt;/strong&gt;&lt;/div&gt;
&lt;div id="_mcePaste"&gt;&lt;strong&gt;}&lt;/strong&gt;&lt;/div&gt;
&lt;/blockquote&gt;
&lt;p&gt;The beginning of the script reads in the command line argument (words.txt in the example above) then reads the word list into memory. Specifically into a &lt;em&gt;hash&lt;/em&gt; structure named &lt;strong&gt;words&lt;/strong&gt; hash, but I&amp;#8217;ll discuss that later. While reading the file into memory, it also strips carriage returns and unprintable characters.&lt;/p&gt;
&lt;p&gt;Next the script steps through each entry in the hash (&lt;strong&gt;%words&lt;/strong&gt;). It takes this entry, and rotates it using the rotate function, once for each letter in the word. This way we end up with all possible rotations.&lt;/p&gt;
&lt;p&gt;In a future post I&amp;#8217;ll cover some of the neat things you can do once you have a word list in memory.&lt;/p&gt;
</description>
    </item>
    <item>
      <pubDate>Mon, 21 Jun 2010 20:13:09 GMT</pubDate>
      <title>Portable Electrick Storage Device &#x2013; Mark I</title>
      <link>http://robots.net/person/jkkroll/diary.html?start=40</link>
      <guid>http://robotguy.net/blog/2010/06/21/portable-electrick-storage-device-mark-i/</guid>
      <description>&lt;p&gt;My daughter has swim meets every Saturday morning from 7am until around 1pm. During this time she is actually swimming a total of about 4 minutes, so the entire family tries to stay occupied the rest of the day. Almost every week someone complains &amp;#8220;Oh, man! My iPod is dead!&amp;#8221; Answering the tinkerer&amp;#8217;s call to arms, I would like to present the Portable Electrick Storage Device Mark I:&lt;/p&gt;
&lt;div class="wp-caption alignnone" style="width: 210px"&gt;&lt;a href="http://robotguy.net/PESD-1.jpg" &gt;&lt;img title="Outside" src="http://robotguy.net/tn_PESD-1.jpg" alt="" width="200" height="186" /&gt;&lt;/a&gt;&lt;p class="wp-caption-text"&gt;Outside&lt;/p&gt;&lt;/div&gt;
&lt;div class="wp-caption alignnone" style="width: 139px"&gt;&lt;a href="http://robotguy.net/PESD-2.jpg" &gt;&lt;img title="Inside" src="http://robotguy.net/tn_PESD-2.jpg" alt="" width="129" height="200" /&gt;&lt;/a&gt;&lt;p class="wp-caption-text"&gt;Inside&lt;/p&gt;&lt;/div&gt;
&lt;div class="wp-caption alignnone" style="width: 210px"&gt;&lt;a href="http://robotguy.net/PESD-usb.jpg" &gt;&lt;img title="usb" src="http://robotguy.net/tn_PESD-usb.jpg" alt="" width="200" height="93" /&gt;&lt;/a&gt;&lt;p class="wp-caption-text"&gt;USB Connectors&lt;/p&gt;&lt;/div&gt;
&lt;div class="wp-caption alignnone" style="width: 196px"&gt;&lt;a href="http://robotguy.net/PESD-charging.jpg" &gt;&lt;img title="charging" src="http://robotguy.net/tn_PESD-charging.jpg" alt="" width="186" height="200" /&gt;&lt;/a&gt;&lt;p class="wp-caption-text"&gt;Charging my iPad&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;Specs:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Box      &amp;#8211; $6 brand new at the local thrift store, I only added electronics and      handles. (I need to head back and get a couple more!)&lt;/li&gt;
&lt;li&gt;Battery      &amp;#8211; 12V 7Ah (~12 iPod charges or 3.5 iPad charges)&lt;/li&gt;
&lt;li&gt;Output      &amp;#8211; 5V @ 1.5A (will charge iPad while watching video)&lt;/li&gt;
&lt;li&gt;Connectors      &amp;#8211; 3x USB Type-A female&lt;/li&gt;
&lt;li&gt;3A      fuse directly on battery&lt;/li&gt;
&lt;li&gt;Power      switch with blue LED indicator&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Plans for the future:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&amp;#8220;Working&amp;#8221; steam power plant&lt;/li&gt;
&lt;li&gt;Microcontroller      based monitor (Battery charge level, internal temp, etc) with 128&amp;#215;128 OLED      screen&lt;/li&gt;
&lt;li&gt;Embedded      wireless web server (WRT54G based)&lt;/li&gt;
&lt;/ul&gt;
</description>
    </item>
    <item>
      <pubDate>Sun, 12 Jul 2009 03:09:35 GMT</pubDate>
      <title>Steampunk PDA &#x2013; Again</title>
      <link>http://robots.net/person/jkkroll/diary.html?start=39</link>
      <guid>http://robotguy.net/blog/2009/07/11/steampunk-pda-again/</guid>
      <description>&lt;p&gt;I have been convinced to add the &lt;a title="PDA" href="http://robotguy.net/blog/?cat=12" target="_blank" &gt;Steampunk PDA&lt;/a&gt; back to my list of projects I am allowing myself to work on, so the list currently stands as &lt;a href="http://robotguy.net/blog/?cat=20" target="_blank" &gt;Deskpet&lt;/a&gt;, &lt;a href="http://robotguy.net/blog/?cat=26" target="_blank" &gt;Mazetrix&lt;/a&gt;, PDA and &lt;a href="http://robotguy.net/blog/?cat=21" target="_blank" &gt;notebooks&lt;/a&gt;. I ordered the accelerometers for the next 3 Mazetrix tiles (should be here Monday), and I should be building a couple of notebooks for some guys at work, but this sounded like more fun.&lt;/p&gt;
&lt;p&gt;I have been thinking about the PDA for a week or two now, and decided to make a custom case rather than attempting to use a pocketwatch case. I picked up a 2&amp;#8243; brass pipe fitting from the hardware store and&#xA0; started shaping it on the lathe. It should be just about the right size&amp;#8230;&lt;/p&gt;
&lt;div class="wp-caption alignnone" style="width: 160px"&gt;&lt;a href="http://robotguy.net/brass_4.JPG" &gt;&lt;img title="Steampunk PDA Case - Size Comparison" src="http://robotguy.net/tn_brass_4.JPG" alt="PDA Case" width="150" height="102" /&gt;&lt;/a&gt;&lt;p class="wp-caption-text"&gt;Steampunk PDA Case - Size Comparison&lt;/p&gt;&lt;/div&gt;
&lt;div class="wp-caption alignnone" style="width: 150px"&gt;&lt;a href="http://robotguy.net/brass_1.JPG" &gt;&lt;img title="Steampunk PDA Case" src="http://robotguy.net/tn_brass_1.JPG" alt="PDA Case" width="140" height="150" /&gt;&lt;/a&gt;&lt;p class="wp-caption-text"&gt;Steampunk PDA Case&lt;/p&gt;&lt;/div&gt;
&lt;div class="wp-caption alignnone" style="width: 160px"&gt;&lt;a href="http://robotguy.net/brass_2.JPG" &gt;&lt;img title="Steampunk PDA Case" src="http://robotguy.net/tn_brass_2.JPG" alt="Steampunk PDA Case" width="150" height="148" /&gt;&lt;/a&gt;&lt;p class="wp-caption-text"&gt;Steampunk PDA Case&lt;/p&gt;&lt;/div&gt;
&lt;div class="wp-caption alignnone" style="width: 160px"&gt;&lt;a href="http://robotguy.net/brass_3.JPG" &gt;&lt;img title="Steampunk PDA Case" src="http://robotguy.net/tn_brass_3.JPG" alt="Steampunk PDA Case" width="150" height="144" /&gt;&lt;/a&gt;&lt;p class="wp-caption-text"&gt;Steampunk PDA Case&lt;/p&gt;&lt;/div&gt;
</description>
    </item>
    <item>
      <pubDate>Fri, 26 Jun 2009 04:10:54 GMT</pubDate>
      <title>#mazetrix video 1</title>
      <link>http://robots.net/person/jkkroll/diary.html?start=38</link>
      <guid>http://robotguy.net/blog/2009/06/25/mazetrix-video-1/</guid>
      <description>&lt;p&gt;I spent about 4 hours programming last night trying to simulate the physics of a rolling ball on the AVR. I think it turned out pretty well:&lt;/p&gt;
&lt;p&gt;&lt;object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="275" height="226" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"&gt;&lt;param name="src" value="http://www.youtube.com/v/a1ueQ7cmRw4" /&gt;&lt;embed type="application/x-shockwave-flash" width="275" height="226" src="http://www.youtube.com/v/a1ueQ7cmRw4"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/p&gt;
&lt;p&gt;Here&amp;#8217;s the timer interrupt that services the analog to digital converter and the multiplexing of the LEDs:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;ISR(TIMER2_OVF_vect){&lt;br /&gt;
static unsigned char activeLine=0;&lt;br /&gt;
static unsigned char adcChannel=0;&lt;br /&gt;
PORTC=0xFF;&lt;br /&gt;
PORTA=0xFF;&lt;br /&gt;
selectLine(activeLine);&lt;br /&gt;
PORTC=~green_display[activeLine];&lt;br /&gt;
PORTA=~red_display[activeLine];&lt;br /&gt;
activeLine++;&lt;br /&gt;
if(activeLine&amp;gt;7){&lt;br /&gt;
activeLine=0;&lt;br /&gt;
}&lt;br /&gt;
switch(adcChannel){&lt;br /&gt;
case 0: x_accel=(ADCH-x_flat)/10;&lt;br /&gt;
if((x_loc&amp;lt;500)&amp;amp;&amp;amp;(x_accel&amp;lt;0)){ 					x_accel=0; 				} 				if((x_loc&amp;gt;7500)&amp;amp;&amp;amp;(x_accel&amp;gt;0)){&lt;br /&gt;
x_accel=0;&lt;br /&gt;
}&lt;br /&gt;
x_vel=limit(x_vel+x_accel,-MAXVELOCITY,MAXVELOCITY);&lt;br /&gt;
ADMUX=0xE1;&lt;br /&gt;
adcChannel=1;&lt;br /&gt;
break;&lt;br /&gt;
case 1: y_accel=(y_flat-ADCH)/10;&lt;br /&gt;
if((y_loc&amp;lt;500)&amp;amp;&amp;amp;(y_accel&amp;lt;0)){ 					y_accel=0; 				} 				if((y_loc&amp;gt;7500)&amp;amp;&amp;amp;(y_accel&amp;gt;0)){&lt;br /&gt;
y_accel=0;&lt;br /&gt;
}&lt;br /&gt;
//if((abs(y_accel)&amp;gt;1)||(abs(y_vel)&amp;gt;20)){&lt;br /&gt;
y_vel=limit(y_vel+y_accel,-MAXVELOCITY,MAXVELOCITY);&lt;br /&gt;
//}else{&lt;br /&gt;
//	y_vel=0;&lt;br /&gt;
//}&lt;br /&gt;
ADMUX=0xE2;&lt;br /&gt;
adcChannel=2;&lt;br /&gt;
break;&lt;br /&gt;
case 2: z_accel=(ADCH-125);&lt;br /&gt;
ADMUX=0xE0;&lt;br /&gt;
adcChannel=0;&lt;br /&gt;
break;&lt;br /&gt;
default: adcChannel=0;&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;And the main loop:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;while(1){&lt;/p&gt;
&lt;p&gt;if((abs(x_vel)&amp;gt;STICTION)||(abs(y_vel)&amp;gt;STICTION)){&lt;br /&gt;
x_vel=(int)((ELASTICNUMERATOR*(long int)x_vel)/ELASTICDENOMINATOR);&lt;br /&gt;
x_loc+=x_vel;&lt;br /&gt;
y_vel=(int)((ELASTICNUMERATOR*(long int)y_vel)/ELASTICDENOMINATOR);&lt;br /&gt;
y_loc+=y_vel;&lt;br /&gt;
}&lt;br /&gt;
if(x_loc&amp;lt;0){ 			x_loc=-x_loc; 			x_vel=-x_vel; 		} 		if(x_loc&amp;gt;7999){&lt;br /&gt;
x_loc=7999;&lt;br /&gt;
x_vel=-x_vel;&lt;br /&gt;
}&lt;br /&gt;
if(y_loc&amp;lt;0){ 			y_loc=-y_loc; 			y_vel=-y_vel; 		} 		if(y_loc&amp;gt;7999){&lt;br /&gt;
y_loc=7999;&lt;br /&gt;
y_vel=-y_vel;&lt;br /&gt;
}&lt;br /&gt;
x_pos=(unsigned char)(x_loc/1000);&lt;br /&gt;
y_pos=(unsigned char)(y_loc/1000);&lt;br /&gt;
plotBall(x_pos,y_pos);&lt;br /&gt;
_delay_ms(50);&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;&lt;/blockquote&gt;
</description>
    </item>
  </channel>
</rss>
