<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>

<channel>
	<title>Arduiniana</title>
	<atom:link href="http://arduiniana.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://arduiniana.org</link>
	<description>Arduino software jewellery and wisdom by Mikal Hart</description>
	<pubDate>Mon, 22 Feb 2010 13:22:23 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Puzzle Box Opens!</title>
		<link>http://arduiniana.org/2010/02/puzzle-box-opens/</link>
		<comments>http://arduiniana.org/2010/02/puzzle-box-opens/#comments</comments>
		<pubDate>Mon, 22 Feb 2010 06:11:37 +0000</pubDate>
		<dc:creator>Mikal</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[puzzle box]]></category>

		<guid isPermaLink="false">http://arduiniana.org/?p=632</guid>
		<description><![CDATA[Hurrah! I’m very pleased to announce the first ever successful opening of a Reverse Geocache™ Puzzle Box. (If you don’t know what a Reverse Geocache is, you should read this first.) The event occurred Saturday night, January 30th, in Austin, Texas, USA.
Alas, it wasn’t the famous box that opened – that one is still sitting sadly [...]]]></description>
			<content:encoded><![CDATA[<p>Hurrah! I’m very pleased to announce the first ever successful opening of a Reverse Geocache™ Puzzle Box. (If you don’t know what a Reverse Geocache is, you should read <a href="projects/the-reverse-geo-cache-puzzle/">this</a> first.) The event occurred Saturday night, January 30th, in Austin, Texas, USA.</p>
<p>Alas, it wasn’t the famous box that opened – that one is still sitting sadly on a Parisian bookshelf, waiting patiently for its newlywed owners to transport it to their romantic island. No, the box that was solved is the black floral-patterned one from a brand new collection of prototypes I’ve recently constructed. These new models have features that improve on the original without damaging its charm or mystique.</p>
<div id="attachment_633" class="wp-caption alignright" style="width: 310px"><a href="http://arduiniana.org/wp-content/uploads/2010/02/img_6858.jpg"><img class="size-medium wp-image-633 " title="The &quot;Black Floral&quot; prototype box" src="http://arduiniana.org/wp-content/uploads/2010/02/img_6858-300x200.jpg" alt="The &quot;Black Floral&quot; prototype box" width="300" height="200" /></a><p class="wp-caption-text">The &quot;Black Floral&quot; prototype box</p></div>
<p>The new designs sport a discreet USB connector that provides the emergency “back door” access – for those that know the secret password. As the owner, you can open and close the box to your heart’s content and program your own destinations. When your recipient finishes his/her puzzle box adventure, you lock up a new “treasure” and begin another!</p>
<p>I was privileged to be in attendance at the big event, and when that little internal motor whirred to announce the opening, the car erupted with cheers. The experience taught me something interesting. I learned that besides hobbyists, geocachers, romantics, puzzle collectors, and artsy geeks, another population thinks puzzle boxing is pretty fun – <em>kids!</em></p>
<p>The claimants to the title are in fact children &#8212; our two and one of their school friends. Here’s what happened.</p>
<p>I sealed a $20 bill in the &#8220;Black Floral&#8221; and programmed it to open at P. Terry’s, a slightly chic burger joint not too far from our house – 1.71 miles, in fact, according to the blue display. I modified the greeting to read “Your/dinner/is in/the box!” – customizing messages is another thing the owner can do – and handed it without a word of explanation to my 11-year-old son.</p>
<div id="attachment_635" class="wp-caption aligncenter" style="width: 310px"><a href="http://arduiniana.org/wp-content/uploads/2010/02/p-terrys.jpg"><img class="size-medium wp-image-635" title="P. Terry's" src="http://arduiniana.org/wp-content/uploads/2010/02/p-terrys-300x215.jpg" alt="P. Terry's" width="300" height="215" /></a><p class="wp-caption-text">P. Terry&#39;s</p></div>
<p>Well, my kids know what to do with a puzzle box, and soon a van full of youngsters was motoring about town hunting for their supper, yours truly acting as silent chauffeur. As we drove, I discovered that young folks take a vastly different approach to solving this kind of puzzle. Most of my adult readers like drawing circles on maps and performing calculations vaguely suggestive of what we call <em>trilateration</em>, but kids seem to have little patience for pencils and compasses. They prefer to just drive, drive, drive – repeatedly pressing the button and changing course when the distances start increasing. This semi-random-walk technique can quickly get you stuck on a dead-end street in the “wrong” part of town, but I have to say it’s no less exciting than the scientific approach.</p>
<p>After a few faulty turns and considerable head scratching, they finally found their dinner. At one point in the adventure we actually stopped at a light immediately opposite P. Terry’s. I thought the gig was surely up, but even though the display read “Distance 163 feet” – just barely outside the 150 foot radius I had set – the kids still managed to fritter away 20 more hungry minutes navigating a parking lot half a mile further down William Cannon Drive.</p>
<p>Now that I’ve experienced the dual joys of building and delivering Reverse Geocache Puzzles, it’s very nice to actually get to <em>play</em> with them. Today my little nephew Nate was looking a bit forlorn, so I put a tiny toy in one of the small maple boxes and sent him on his own private mission. To boost his spirits I personalized his name into the greeting – “Hi Nate!/ Can you/open the/box..?”. He’s not yet eight, so I just sent him to a neighbor’s house about 600 feet away. When after a few minutes he came trotting back, Piglet style, “his” box open and treasure in hand, the smile on his face belied his happiness.</p>
<p>The Reverse Geocache continues to prove an interesting little puzzle with broad appeal. Whether it’s a romantic engagement-ring trek to the summit of the Matterhorn or a little kid’s 20-minute “adventure” down the street, solving one is a rich and joyful experience.</p>
]]></content:encoded>
			<wfw:commentRss>http://arduiniana.org/2010/02/puzzle-box-opens/feed/</wfw:commentRss>
		</item>
		<item>
		<title>New Year Treat: NewSoftSerial 10</title>
		<link>http://arduiniana.org/2010/01/newsoftserial-10/</link>
		<comments>http://arduiniana.org/2010/01/newsoftserial-10/#comments</comments>
		<pubDate>Thu, 07 Jan 2010 18:47:03 +0000</pubDate>
		<dc:creator>Mikal</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[Arduino libraries]]></category>

		<guid isPermaLink="false">http://arduiniana.org/?p=597</guid>
		<description><![CDATA[NewSoftSerial 10 is available for testing. There are a number of fun new features to play with, including support for 20MHz processors and Arduino siblings like the Teensy and Teensy++.  I&#8217;ve also added a destructor (and an end()) so that you can employ temporary NewSoftSerial objects, for example:
if (need_to_check_GPS)
{
  NewSoftSerial gpsconn(6, 3);
  ...
} [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http:newsoftserial">NewSoftSerial 10</a> is available for testing. There are a number of fun new features to play with, including support for 20MHz processors and Arduino siblings like the Teensy and Teensy++.  I&#8217;ve also added a destructor (and an end()) so that you can employ temporary NewSoftSerial objects, for example:</p>
<pre>if (need_to_check_GPS)
{
  NewSoftSerial gpsconn(6, 3);
  ...
} // Object is destroyed/cleaned up here</pre>
<p>Another useful new feature is the support for serial devices which use inverted TTL signalling &#8212; where &#8220;HIGH&#8221; is 0 and &#8220;LOW&#8221; 1. To enable automatic inversion, simply provide a boolean &#8220;true&#8221; as the third parameter in the constructor:</p>
<pre>NewSoftSerial nssinv(3, 2, true); //uses inverted signalling</pre>
<p>Could someone please test? I don&#8217;t have any inverse logic devices.</p>
<p>Many thanks to Garrett Mace and Paul Stoffregen for their contributions!</p>
<p><em>Update: Please upgrade to version 10c.  10b was a defective posting.</em></p>
<p>Mikal</p>
]]></content:encoded>
			<wfw:commentRss>http://arduiniana.org/2010/01/newsoftserial-10/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Puzzle Box 3: The Voyeuristic World</title>
		<link>http://arduiniana.org/2009/11/puzzle-box-3-the-voyeuristic-world/</link>
		<comments>http://arduiniana.org/2009/11/puzzle-box-3-the-voyeuristic-world/#comments</comments>
		<pubDate>Tue, 10 Nov 2009 04:18:08 +0000</pubDate>
		<dc:creator>Mikal</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[puzzle box]]></category>

		<guid isPermaLink="false">http://arduiniana.org/?p=553</guid>
		<description><![CDATA[[Next read the most recent chapter in the puzzle box story.]
The puzzle box continues to generate lots of interest.  This week I encountered it in two different geocaching podcasts, a Serbian blog, and Daniel Soltis&#8217; talk at Playful &#8216;09 in London.  I&#8217;ve fielded calls from network TV channels, film producers, engineers, and machine shops all [...]]]></description>
			<content:encoded><![CDATA[<p><em><strong>[Next read <a href="http:puzzle-box-opens/">the most recent chapter</a> in the puzzle box story.]</strong></em></p>
<p>The puzzle box continues to generate lots of interest.  This week I encountered it in two different <a href="http://www.geocachingpodcast.info/2009/10/episode-126-midwest-meet-up-cacher.html">geocaching</a> <a href="http://www.podcacher.com/?p=646">podcasts</a>, a <a href="http://www.pcpress.info/zabava/geekstuff/geek-poklon-kutija-koja-se-otvara-samo-na-jednom-mestu-u-svetu/">Serbian blog</a>, and <a href="http://www.danielsoltis.com/">Daniel Soltis&#8217;</a> talk at <span style="text-decoration: underline;"><a href="http://www.thisisplayful.com/">Playful &#8216;09</a></span> in London.  I&#8217;ve fielded calls from network TV channels, film producers, engineers, and machine shops all over the country.  Everyone seems to want to bottle up the magic that swirls around this strange little box.</p>
<p>I particularly enjoyed <a href="http://michaelandlaura.org.uk/~laura/blog/2009/10/playful.html">reading</a> Soltis&#8217; <a href="http://www.slideshare.net/tinkerit/playful">presentation</a>, which focused on &#8220;the delight of physical objects connected to games.&#8221;  Tangible things like the puzzle box, he writes, provide &#8220;specificity, tactile pleasure, and possibilities for kinds of game play that multi-purpose platforms like phones and computers can&#8217;t.&#8221;  How true.  People love the connection to the physical, especially if there is a touch of mystery to it.  Would you even be reading this if I had just written some old GPS iPhone app?</p>
<div id="attachment_558" class="wp-caption aligncenter" style="width: 310px"><a href="http://arduiniana.org/wp-content/uploads/2009/11/soltis.jpg"><img class="size-medium wp-image-558" title="soltis" src="http://arduiniana.org/wp-content/uploads/2009/11/soltis-300x249.jpg" alt="Excerpt: Nick Marsh's Graphical Notes for Playful '09" width="300" height="249" /></a><p class="wp-caption-text">From Nick Marsh&#39;s Notes for Playful &#39;09</p></div>
<p><strong><em>&#8220;Yes, yes, but have they managed to open the box yet?!&#8221;</em></strong></p>
<p>As a matter of fact, I have recently been in very close email contact with Chris - that&#8217;s the newly-married friend who has unknowingly been at the center of this hullaballoo.  He writes to say that he has been busy putting finishing touches on his beautiful new film <em>The Luminiferous Aether</em>, preparing it for submission to festivals in the coming year.  I hope you get to see it someday&#8211; it&#8217;s a remarkable work, especially for a first effort.  This is the movie, incidentally, that led to romance with his leading lady those many months ago on the French island.  I was treated to a sneak preview shortly after I got back from their wedding, but I&#8217;m afraid the detailed appraisal I promised in return is dreadfully late.  There&#8217;s a whiff of irony here.  While Chris waits patiently for the thoughtful and sober review his film deserves, I&#8217;ve been too busy returning calls and composing articles about <em>his</em> puzzle box to write it.  He has no idea how much he himself, in some warped sense, is to blame for my slow response.</p>
<p>So to answer the question, no, I&#8217;m afraid I don&#8217;t have a single tidbit of new puzzle box gossip to share.  I haven&#8217;t heard a thing.  But isn&#8217;t it fun being part of the watching crowd?  I love it.  This surprising little adventure seems to be entering a third phase: first there was the creation and the presentation, then the unexpected storm of publicity; now we&#8217;re to the point where thousands of people - perhaps tens of thousands - are watching to see how it all plays out.  If you are reading this, you are now <em>part of the story.  </em>We are all initiates into what I am calling the &#8220;voyeuristic world&#8221;, reminiscent of the film <em><a href="http://www.imdb.com/title/tt0120382/">The Truman Show</a></em>, in which a young man inadvertently discovers that his daily life is being watched by millions on TV.  The difference is that <em>this</em> reality show is <em>real!</em></p>
<div id="attachment_555" class="wp-caption aligncenter" style="width: 310px"><a href="http://arduiniana.org/wp-content/uploads/2009/11/chris-and-christele-2.jpg"><img class="size-medium wp-image-555 " title="The-couple-at-the-wedding-dinner" src="http://arduiniana.org/wp-content/uploads/2009/11/chris-and-christele-2-300x200.jpg" alt="The Couple at the Wedding Dinner" width="300" height="200" /></a><p class="wp-caption-text">The Couple at the Wedding Dinner (Kelly Neal)</p></div>
<p>I had a nice conversation this week with photographer Kelly Neal, who graciously gave me free rein to use pictures like the above to illustrate my articles.  If the puzzle box story is moving too slowly to satisfy your voyeuristic needs, perhaps you&#8217;d enjoy strolling through his <a href="http://kellynealphotography.smugmug.com/Weddings/P/9844658_cnVcv/1/669537335_Bhmn9">official wedding site</a>, imagining what it must have been like to have attended that little French village wedding.  You are, after all, a part of the story!  If you like the pictures, please give Kelly a call.</p>
<p>And now some answers:</p>
<p><strong><em>&#8220;Why don&#8217;t you just <span style="text-decoration: underline;">ask</span> about the box?&#8221;</em></strong></p>
<p>Well, because I&#8217;m enjoying the adventure too much.  I fear that asking my friends for an update will ultimately help hasten the story&#8217;s denouement.  I intend to ride it as far as it will go.</p>
<p><strong><em>&#8220;Why do you think they haven&#8217;t said anything?</em></strong></p>
<p>I think they&#8217;ve probably figured out where to go by now.  But it <em>is</em> 400 kilometers away, and they are busy people.  A trip like that would require at least a long, unencumbered weekend.  I imagine they are just waiting for a convenient time.</p>
<p><em>&#8220;<strong>What if the couple finds this web page&#8230;? Won&#8217;t that spoil it?</strong></em></p>
<p>I think that&#8217;s part of the fascination.  Will they get to the island first&#8230; or find the web article?  I don&#8217;t know.  But even if they do discover the publicity, I&#8217;m not sure that will entirely spoil it.  They still need to get the box open, and there are still one or two things my article doesn&#8217;t reveal&#8230; the contents of the &#8220;overly sentimental card&#8221; for example.  I think there&#8217;s still plenty of mystery and suspense to go round.</p>
<p><em>&#8220;<strong>What happens if they don&#8217;t figure it out in 50 tries?&#8221;</strong></em></p>
<p>Ah!  It displays a painful little message indicating that the box is sealed forever, then suggests returning it to the manufacturer for help.</p>
<p><strong><em>&#8220;How can I get one?&#8221;</em></strong></p>
<p>The puzzle box is not just a thing, it&#8217;s an experience.  It&#8217;s personal.  It&#8217;s mysterious.  It&#8217;s an adventure.  I don&#8217;t want to see glossy plastic versions mass produced all over the world, because such things would only dimly reflect the magic of the box I built for my friends and subtract from its unique beauty.  The original was lovingly constructed by a human being and embodies the special relationship between three people.  I don&#8217;t think such a personal thing should be turned into a commodity. </p>
<p>That said, I have a team of people considering how we might build a small number for special, personal occasions.  Many people have had the idea, for example, of using a ring box to propose marriage.  Bravo!  Or how about this?  A proud father gives a box to a beloved daughter leaving home for college.  The box eventually leads her to a car dealership, revealing a set of keys.  The possibilities for a rich experience seem boundless.  I hope eventually to help people realize experiences like these.  Just don&#8217;t expect to see them anytime soon.  Or on the shelves at Target.</p>
<p><strong><em>&#8220;Can I commission one?&#8221;</em></strong></p>
<p>I am making a very small number of hand-built boxes, either replicas of the original elephant box or custom designs.  If you are serious, please contact me at mikal (at) arduiniana.org.</p>
<p><strong><em>Where can I see </em>The Luminiferous Aether<em>?</em></strong></p>
<p>Stay tuned.  It&#8217;s not available yet.</p>
<p><strong><em>How do you pronounce your name?</em></strong></p>
<p>The same way ordinary Michaels do.  Mine is simply a creative spelling of the common name.  Thanks, Mom and Dad!</p>
<p>If you want to keep following this story, subscribe to the RSS feed (above).  I&#8217;m also trying out twitter @mikalhart.  Leave a note anytime.</p>
<p><em><strong>[Next read <a href="http:puzzle-box-opens/">the most recent chapter</a> in the puzzle box story.]</strong></em></p>
]]></content:encoded>
			<wfw:commentRss>http://arduiniana.org/2009/11/puzzle-box-3-the-voyeuristic-world/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Puzzle Box - Chapter 2</title>
		<link>http://arduiniana.org/2009/10/puzzle-box-chapter-2/</link>
		<comments>http://arduiniana.org/2009/10/puzzle-box-chapter-2/#comments</comments>
		<pubDate>Sun, 25 Oct 2009 19:50:35 +0000</pubDate>
		<dc:creator>Mikal</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[puzzle box]]></category>

		<guid isPermaLink="false">http://arduiniana.org/?p=525</guid>
		<description><![CDATA[[Next read chapter 3 in the puzzle box story.]
The Puzzle Box story has a delightful second act.
It&#8217;s Saturday night, five weeks to the day since the wedding, and despite the recent firestorm of publicity, I still haven&#8217;t heard whether my friends have managed to open the Reverse Geocache Puzzle Box.  It&#8217;s certainly possible they are [...]]]></description>
			<content:encoded><![CDATA[<p><em><strong>[Next read <a href="http:puzzle-box-3-the-voyeuristic-world/">chapter 3</a> in the puzzle box story.]</strong></em></p>
<p>The <a href="http:projects/the-reverse-geo-cache-puzzle/">Puzzle Box story</a> has a delightful second act.</p>
<p>It&#8217;s Saturday night, five weeks to the day since the wedding, and despite the recent firestorm of publicity, I still haven&#8217;t heard whether my friends have managed to open the Reverse Geocache Puzzle Box.  It&#8217;s certainly possible they are playing it cool, waiting for just the right moment to share the story of their adventure, but I think it&#8217;s more likely the box is still intact.  If so, each passing day increases the likelihood that they will stumble first onto one of the dozens of articles that popped up on the web this week.</p>
<p>On Monday, <a href="http://hackaday.com/2009/10/19/reverse-geocache-puzzle/">Hack-a-Day</a> and <a href="http://blog.makezine.com/archive/2009/10/gps-enabled_puzzle_box_opens_only_a.html">MAKE Magazine</a> independently posted generous write ups on their blogs.  Then around noon <a href="http://www.engadget.com/2009/10/20/homemade-gps-puzzle-box-puts-a-modern-spin-on-treasure-hunts/">Engadget</a>, <a href="http://www.slashgear.com/reverse-geocache-puzzle-doles-out-presents-depending-on-location-1960890/">Slashgear</a>, and <a href="http://gizmodo.com/5384893/gps-puzzle-box-only-opens-in-one-specific-location">Gizmodo</a> also picked up the story of the mysterious box that can only be opened in one place on earth.  This seemed to trigger a flurry of <a href="http://topsy.com/tb/bit.ly/3Y2nQT">tweets</a>, links, and mentions on Facebook, various geocaching and <a href="http://runningofthebride.blogspot.com/2009/10/i-put-my-box-in-box-for-you-france.html">wedding forums</a>, blogs, and <a href="http://www.geocachingpodcast.info/2009/10/episode-126-midwest-meet-up-cacher.html">podcasts</a> everywhere.  Sites as remote as <a href="http://www.dongua.com/bar/zKK4/">China</a> started running variants of the story - I recognized it only by the links and photos - and by Monday night my website had seen three times as much traffic in a single day than it had the entire year!</p>
<p>But a bigger push was still to come.  Late Wednesday I got a call to do a telephone interview with Los Angeles Times tech reporter David Colker, who weaved together a <a href="http://latimesblogs.latimes.com/technology/2009/10/wedding-gift-cant-open-until-it-gets-to-secret-gps-location.html">charming article</a> comparing the box saga to &#8220;Mission Impossible&#8221; or James Bond.  David said that everyone in his office &#8220;just loved&#8221; it, both the tech-y folks and the not-so.  But that&#8217;s the appeal of this little project, isn&#8217;t it?  It works hard to balance the geeky with the intensely personal.  Or as my favorite tweeter wrote, &#8220;<em>it&#8217;s the perfect combination of mystery, software, romance, and mechatronics</em>.&#8221;  Ha!  I love that!  Yes friends, after centuries of seeking the ideal balance between those four great pillars of art, only now has perfection finally been achieved!</p>
<p>Thursday morning the <em>Times</em> ran the article, which was subsequently lifted by the <em>Seattle Times</em>, the <em>Orlando Sentinel</em>, the <em>New York Post</em>, and a number of West-coast blogs. Traffic on <em>arduiniana.org</em> surged even higher.  And despite all, we <em>still</em> don&#8217;t know whether the couple have opened the box.  It&#8217;s like the world has been partitioned.  Those who have seen the amazing coverage stand on the one side, eagerly waiting to see when and how those on the <em>other</em> side - my friend and his small circle - will stumble across the secret.  Personally, I hope that he opens the box before discovering all the press.</p>
<p>And so we keep waiting.</p>
<p>Meanwhile, I have enjoyed reading all the supportive comments.  It&#8217;s humbling to see adjectives like &#8220;dazzling&#8221;, &#8220;delightful&#8221;, and &#8220;amazing&#8221; bandied about in reference to one&#8217;s work.  People seemed especially to like the story of the man who called me a BASTARD! and my friend exhorting everyone &#8220;Don&#8217;t push the button!&#8221;  Digging through the photos posted on the wedding photographer&#8217;s website, I was delighted to see that he captured the very instant that my friend first uttered that phrase, &#8220;Ne poussez pas le bouton!&#8221;  The anxious speaker, unfortunately, is off camera right in this photo, but you can see my cousin Scott (right) and myself (standing) about to burst with laughter.</p>
<div id="attachment_529" class="wp-caption aligncenter" style="width: 310px"><a href="http://arduiniana.org/wp-content/uploads/2009/10/dont-push-the-button.jpg"><img class="size-medium wp-image-529" title="dont-push-the-button" src="http://arduiniana.org/wp-content/uploads/2009/10/dont-push-the-button-300x200.jpg" alt="&quot;Hey, don't push that button!&quot;" width="300" height="200" /></a><p class="wp-caption-text">Hey, dont push that button!</p></div>
<p style="TEXT-ALIGN: left">And here, for your edification, is the BASTARD guy himself, facing the camera:</p>
<div id="attachment_530" class="wp-caption aligncenter" style="width: 310px"><a href="http://arduiniana.org/wp-content/uploads/2009/10/the-bastard-guy.jpg"><img class="size-medium wp-image-530" title="the-bastard-guy" src="http://arduiniana.org/wp-content/uploads/2009/10/the-bastard-guy-300x200.jpg" alt="The guy who called me a BASTARD!" width="300" height="200" /></a><p class="wp-caption-text">The guy who called me a BASTARD!</p></div>
<p>And still we wait.</p>
<p>Be assured that as soon as I hear how this story ends, I will let you all know.  One reader suggested that the couple should put the box up for sale on EBay.  Lots of people want copies of the Reverse Geocache Puzzle box, but owning the famous <em>original</em> - now that should be worth something!</p>
<p>Heady days.</p>
<p>Mikal</p>
<p><em><strong>[Next read <a href="http:puzzle-box-3-the-voyeuristic-world/">chapter 3</a> in the puzzle box story.]</strong></em></p>
]]></content:encoded>
			<wfw:commentRss>http://arduiniana.org/2009/10/puzzle-box-chapter-2/feed/</wfw:commentRss>
		</item>
		<item>
		<title>The Reverse Geocache Puzzle &#8482;</title>
		<link>http://arduiniana.org/2009/10/the-reverse-geocache-puzzle/</link>
		<comments>http://arduiniana.org/2009/10/the-reverse-geocache-puzzle/#comments</comments>
		<pubDate>Fri, 09 Oct 2009 18:56:49 +0000</pubDate>
		<dc:creator>Mikal</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[puzzle box]]></category>

		<guid isPermaLink="false">http://arduiniana.org/?p=360</guid>
		<description><![CDATA[There is a cool new addition to the website today &#8212; a project I call the Reverse Geocache Puzzle (tm).  It&#8217;s a box that won&#8217;t open until its owner figures out where on earth to move it.  I built it for a friend who got married in France last month.  The software for this project incorporates [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_373" class="wp-caption alignleft" style="width: 310px"><a href="http:the-reverse-geo-cache-puzzle"><img class="size-medium wp-image-373" title="The Box" src="http://arduiniana.org/wp-content/uploads/2009/10/fig1-6471-300x212.jpg" alt="Fig. 1 - The Box" width="300" height="212" /></a><p class="wp-caption-text">The Puzzle Box</p></div>
<p>There is a cool new addition to the website today &#8212; a project I call the <a href="http:the-reverse-geo-cache-puzzle">Reverse Geocache Puzzle</a> (tm).  It&#8217;s a box that won&#8217;t open until its owner figures out where on earth to move it.  I built it for a friend who got married in France last month.  The software for this project incorporates all five of the major libraries on Arduiniana.  Let me know what you think.</p>
<p>Mikal</p>
]]></content:encoded>
			<wfw:commentRss>http://arduiniana.org/2009/10/the-reverse-geocache-puzzle/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Direct Port I/O in NewSoftSerial 9</title>
		<link>http://arduiniana.org/2009/05/direct-port-io-in-newsoftserial-9/</link>
		<comments>http://arduiniana.org/2009/05/direct-port-io-in-newsoftserial-9/#comments</comments>
		<pubDate>Fri, 22 May 2009 05:52:41 +0000</pubDate>
		<dc:creator>Mikal</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[Arduino libraries]]></category>

		<guid isPermaLink="false">http://arduiniana.org/?p=352</guid>
		<description><![CDATA[NewSoftSerial 9 is now available.  This is a major new release that replaces all the performance path pin reads and writes with direct Port I/O.
What does that give you?  Well, a couple of things.  Most importantly, it makes NewSoftSerial more compatible with the latest Arduino release.  Changes to timings of digitalRead and digitalWrite in Arduino [...]]]></description>
			<content:encoded><![CDATA[<p>NewSoftSerial 9 is now <a href="http:NewSoftSerial">available</a>.  This is a major new release that replaces all the performance path pin reads and writes with direct Port I/O.</p>
<p>What does that give you?  Well, a couple of things.  Most importantly, it makes NewSoftSerial more compatible with the latest Arduino release.  Changes to timings of digitalRead and digitalWrite in Arduino 0015 broke NewSoftSerial at higher baud rates.  All software serial libraries are timing sensitive, and even a microsecond or two change in a function&#8217;s timing can introduce enough error to fatally corrupt serial transmissions.  By using direct port I/O and retuning all the timing tables, we avoid problems caused by the longer digitalReads and digitalWrites.  Furthermore, the library should be more immune to future changes of this kind.</p>
<p>Direct port I/O is amazingly fast &#8212; about 10-25 times faster than the equivalent call to digitalRead/Write.  Because of this, NewSoftSerial 9 is able to operate reliably at higher baud rates than in the past.  In my test suite, I am now able to get reliable RX at speeds up to an unprecedented 57.6K baud on a 16MHz processor and 31.25K baud at 8MHz*.  Because the performance paths no longer use digitalRead/Write, they are less sluggish and much easier to tune to the higher speeds.</p>
<p>*These figures are about 70% higher than NewSoftSerial 8 with Arduino 0014.  These were measured using USB-powered Arduinos running a prerelease v. 0016 copy of the software, which optimizes the timer 0 overflow counter &#8212; an important contributor to software serial performance.  I/O was tightly controlled to avoid overflow, which can easily occur at high baud rates when you have no hardware flow control.</p>
<p>Please let me know what you think.  The new version is <a href="http:NewSoftSerial">here</a>.</p>
<p>What&#8217;s next for NewSoftSerial?  Well, there are a number of things being asked for:</p>
<ul>
<li>Arduino Mega support</li>
<li>Signal inversion option</li>
<li>RTS/CTS flow control option</li>
<li>Configurability, i.e. &#8220;E, 7, 1&#8243; style parity, data and stopbit configuration.</li>
</ul>
<p>What are <em>you</em> most interested in?  Let me know here.</p>
<p>Mikal</p>
]]></content:encoded>
			<wfw:commentRss>http://arduiniana.org/2009/05/direct-port-io-in-newsoftserial-9/feed/</wfw:commentRss>
		</item>
		<item>
		<title>New NewSoftSerial coming</title>
		<link>http://arduiniana.org/2009/05/new-newsoftserial-coming/</link>
		<comments>http://arduiniana.org/2009/05/new-newsoftserial-coming/#comments</comments>
		<pubDate>Sat, 02 May 2009 22:54:33 +0000</pubDate>
		<dc:creator>Mikal</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[Arduino libraries]]></category>

		<guid isPermaLink="false">http://arduiniana.org/?p=337</guid>
		<description><![CDATA[Changes in the timing of digitalRead and digitalWrite on 0015 have degraded NewSoftSerial&#8217;s and AFSoftSerial&#8217;s performance on this platform.  If you need software serial at higher baud rates, I recommend you stick with 0014 &#8212; at least until NewSoftSerial 9 comes out.
The good news is that version 9 has been optimized heavily and it [...]]]></description>
			<content:encoded><![CDATA[<p>Changes in the timing of digitalRead and digitalWrite on 0015 have degraded NewSoftSerial&#8217;s and AFSoftSerial&#8217;s performance on this platform.  If you need software serial at higher baud rates, I recommend you stick with 0014 &#8212; at least until NewSoftSerial 9 comes out.</p>
<p>The good news is that version 9 has been optimized heavily and it should prove to be the best version ever &#8212; and run on both 0015 and 0014.  Stay tuned!</p>
<p>Mikal</p>
]]></content:encoded>
			<wfw:commentRss>http://arduiniana.org/2009/05/new-newsoftserial-coming/feed/</wfw:commentRss>
		</item>
		<item>
		<title>NewSoftSerial 8 for 8 (MHz)</title>
		<link>http://arduiniana.org/2009/04/newsoftserial-8/</link>
		<comments>http://arduiniana.org/2009/04/newsoftserial-8/#comments</comments>
		<pubDate>Fri, 24 Apr 2009 04:08:21 +0000</pubDate>
		<dc:creator>Mikal</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[Arduino libraries]]></category>

		<guid isPermaLink="false">http://arduiniana.org/?p=291</guid>
		<description><![CDATA[Over the last couple of weeks I&#8217;ve spent a fair number of hours in front of the logic analyzer, and the result is NewSoftSerial version 8. The major delta in this release is support for 8MHz processors.
The half-speed clock makes accurate serial reception considerably more difficult, but NewSoftSerial 8 still manages to transmit with 100% [...]]]></description>
			<content:encoded><![CDATA[<p>Over the last couple of weeks I&#8217;ve spent a fair number of hours in front of the logic analyzer, and the result is <strong><a href="/libraries/NewSoftSerial">NewSoftSerial version 8</a></strong>. The major delta in this release is <strong style="mso-bidi-font-weight: normal">support for 8MHz processors</strong>.</p>
<p>The half-speed clock makes accurate serial reception considerably more difficult, but NewSoftSerial 8 still manages to transmit with 100% reliability up to 57.6K baud and receive up to 14.4K baud on the Arduino Pro.  Reception at rates up to 38.4K baud is 99+% reliable.  For a better understanding of why the slower processor caps RX at a relatively low baud rate, and for a trick to significantly improve this, read on.</p>
<h3>Flush</h3>
<p>The new library supports the flush() method, which works the same way that HardwareSerial’s flush() does.</p>
<pre>      void flush(); // discard the contents of the RX buffer.</pre>
<h3>PROGMEM use</h3>
<p>NewSoftSerial 8 has been reorganized to move some of the logic into a PROGMEM-based lookup table. You may encounter the following spurious warning message when you build your first NewSoftSerial 8 application:</p>
<pre style="COLOR: red; TEXT-ALIGN: left">    NewSoftSerial.cpp:68: warning: only initialized variables
    can be placed into program memory area</pre>
<p>Be assured that this message is completely harmless. As soon as I figure out how to remove it, I will.</p>
<h3>Potential trouble spots</h3>
<p>There are two problem areas that affect accuracy and cap RX speeds in all software serial libraries:</p>
<ul>
<li>interference from other interrupts in the system</li>
<li>RX interrupt floods/bursts</li>
</ul>
<p>Before I discuss these, an introduction to interrupt-driven serial reception may be in order.</p>
<h3>Interrupt-driven RX</h3>
<p>It all begins when the Arduino software RX pin, normally high, drops low. This is the “start bit” – the signal from the transmitter that bits of data are about to arrive in a sequence of pulses whose width is determined by the agreed-upon baud rate.  The pin&#8217;s state change triggers an interrupt which launches the NewSoftSerial recv() routine. Through a series of eight precisely timed samples, recv() assembles the new byte and stores it in a buffer before releasing the interrupt.</p>
<p>The top waveform in the image below shows the arrival of the letter ‘a’ (hex 61). The RX signal drops low (start bit) and then the data bits arrive, in order from lowest to highest, 1, 0, 0, 0, 0, 1, 1, 0, followed by a high “stop” bit. At each interval, the recv() routine samples the pin and records the bit value. The second waveform demonstrates this sampling process in action, one sample per falling edge.</p>
<p style="TEXT-ALIGN: center"><img class="aligncenter size-full wp-image-298" title="serial-good" src="http://arduiniana.org/wp-content/uploads/2009/04/serial-good.jpg" alt="serial-good" width="558" height="104" /></p>
<p style="text-align: center;"><em>Fig 1. The letter ‘a’ (hex 61) being sampled correctly</em></p>
<p>If all goes well, the received byte is identical to the one transmitted. And this is usually the case, because once the pin-change interrupt fires, NewSoftSerial&#8217;s precisely tuned recv() routine gains absolute control of the processor. Interrupts are disabled during the sampling, so there is no danger that a competing interrupt will corrupt the process.</p>
<p>The problem is that if another interrupt handler is already active when the start bit arrives, then NewSoftSerial&#8217;s pin-change handler is necessarily delayed until the competing routine exits.  If the delay is too long, the sampling routine may read the incoming byte incorrectly, causing it to be mangled or even lost.</p>
<p>When you encounter RX corruption or loss at high baud rates, the most common culprit is Arduino&#8217;s own timer overflow interrupt handler – the routine responsible for millis() and delay().  Consider: on an 8MHz Arduino the timer interrupt lasts a full 20µs, compared to only about 70µs for the entire width of a bit transmitted at 14.4K baud. If the timer interrupt fires at precisely the “wrong” time, i.e. just as a new start bit arrives, important processing may get delayed long enough to cause an error.</p>
<p>The picture below shows just such an event taking place. Comparing to the figure above, you’ll see that the system timer interrupt fires just before the “Serial” line goes low, shifting the sampling process to the right just enough to distort the sampled byte.</p>
<p style="text-align: center;"><em><img class="aligncenter size-full wp-image-297" title="serial-bad" src="http://arduiniana.org/wp-content/uploads/2009/04/serial-bad.jpg" alt="serial-bad" width="602" height="101" />Fig 2. A timer interrupt fatally delaying the sampling sequence<br />
</em></p>
<p>In cases like this, you’ll experience an invalid byte read. On 16MHz processors, the experimentally determined failure rate is quite low – less than 0.5% – and is only seen at the very highest supported baud rates (57600 and 38400) .  But at 8MHz, the problem is exacerbated by the fact that the timer tick interrupt takes twice as long to execute.  Not only is there a greater likelihood that the interrupts will collide unhappily, but because the timer tick is longer, the damage done when there <em>is</em> a collision is proportionally greater.  What this means is that NewSoftSerial running at 8MHz receives data with 100% accuracy only at baud rates less than half those which work reliably at 16MHz. If you want perfect accuracy with an 8MHz clock, stick to rates of 19200 or 14400 baud or less.  Or&#8230;</p>
<h3>Workaround: disabling the timer</h3>
<p>&#8230;if your application can do without the system timer, it is possible to significantly improve RX reliability by turning it off.  NewSoftSerial 8 provides a new method to disable/enable the clock by masking off its interrupt:</p>
<pre>      static void enable_timer0(bool enable);</pre>
<p>While disabling the timer more than doubles the speeds at which 8MHz NewSoftSerial can reliably receive data, it is not recommended that you do so unless you understand the ramifications. Don&#8217;t do it unless you really need perfect reliability at speeds greater than 14400 baud and can live without millis() and delay().  Many applications can absorb the low failures rates (&lt;1%) NewSoftSerial experiences at higher speeds.  For example, for serial GPS devices, <a href="http:libraries/TinyGPS">TinyGPS </a>automatically filters out NMEA sentences that fail the checksum.  This may be sufficient for your app&#8230; or not.</p>
<h3>Flooding/Bursting</h3>
<p>Another situation that can adversely affect data reception is when a peer sends rapid bursts of data (at any baud rate), flooding the Arduino. The bytes arrive one after another so quickly that NewSoftSerial stays constantly in the RX interrupt, filling the receive queue but never allowing it to be drained. This generates an overflow condition, which can be detected by examining NewSoftSerial’s overflow() routine – if your program can ever call it.</p>
<p>Even if it doesn’t trigger an overflow, a flood of bytes can cause problems at high speeds, because tiny errors in the timings that would otherwise have gone unnoticed accumulate.</p>
<p>The best way to avoid problems relating to “flooding” is to prevent them. Eventually I hope to add support for RTS/CTS flow control to NewSoftSerial. In the meanwhile, keep away from devices, especially high speed ones, that generate floods of data.</p>
<h3>Timer based options?</h3>
<p>I’ve had several discussions recently about whether it would be possible to implement a timer-based (as opposed to pin-change-based) software serial device in Arduino. Such a library would theoretically allow a number of simultaneously operating serial devices to coexist, because the interrupt times would be much shorter. However, based on my recent studies with the logic analyzer, I have begun to doubt whether a library that worked at reasonably high speeds could be built. There is just too much interference from other interrupts in the system.</p>
<h3>Conclusions</h3>
<p>Software serial devices are best running at lower baud rates, especially on 8MHz processors. If you need multiple reliable, high speed serial interfaces, consider ATmega328-based Duemilanove, which sports three hardware serial ports.</p>
<h3>Future Directions</h3>
<p>As I mentioned earlier, I will be working soon on implementing an RTS/CTS flow control mechanism to improve the interface with serial devices that tend to transmit in bursts.</p>
<p>The next version of NewSoftSerial will also likely support optional signal inversion.</p>
<p>A couple of people have also expressed interest in being able to more precisely configure the data and parity bits of serial protocol, especially, for example, the relatively popular “E/7/1”. It’s hard to assess exactly how desirable this is.  Who would support increasing the NewSoftSerial footprint by a few bytes in exchange for this kind of configurability?</p>
<h3>Download</h3>
<p>You can get the new version, as usual, in the &#8220;Libraries&#8221; section at <a href="http:Libraries/NewSoftSerial">NewSoftSerial</a>.</p>
<p>Mikal Hart</p>
]]></content:encoded>
			<wfw:commentRss>http://arduiniana.org/2009/04/newsoftserial-8/feed/</wfw:commentRss>
		</item>
		<item>
		<title>New Streaming Library</title>
		<link>http://arduiniana.org/2009/04/new-streaming-library/</link>
		<comments>http://arduiniana.org/2009/04/new-streaming-library/#comments</comments>
		<pubDate>Sat, 18 Apr 2009 02:27:29 +0000</pubDate>
		<dc:creator>Mikal</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[Arduino libraries]]></category>

		<guid isPermaLink="false">http://arduiniana.org/?p=281</guid>
		<description><![CDATA[Thanks to Paul V. and Ben Combee for their useful suggestions on how to support line endings (C++ &#8220;endl&#8221;) and internal format manipulators, respectively, we now have a bona fide Streaming library.
With it, you can now write code like this:
Serial &#60;&#60; "A is " &#60;&#60; lettera &#60;&#60; "." &#60;&#60; endl;
lcd &#60;&#60; "The date is " [...]]]></description>
			<content:encoded><![CDATA[<p>Thanks to Paul V. and Ben Combee for their useful suggestions on how to support line endings (C++ &#8220;endl&#8221;) and internal format manipulators, respectively, we now have a bona fide <a href="/libraries/Streaming">Streaming library</a>.</p>
<p>With it, you can now write code like this:</p>
<pre><code>Serial &lt;&lt; "A is " &lt;&lt; lettera &lt;&lt; "." &lt;&lt; endl;
lcd &lt;&lt; "The date is " &lt;&lt; d &lt;&lt; "-" &lt;&lt; m &lt;&lt; "-" &lt;&lt; y &lt;&lt; ".";
  
eth &lt;&lt; "You can use modifiers too, for example:" &lt;&lt; endl;
Serial &lt;&lt; _BYTE(a) &lt;&lt; " is " &lt;&lt; _HEX(a) &lt;&lt; " in hex. " &lt;&lt; endl;</code></pre>
<p>And thanks <span style="text-decoration: underline;">very much</span> for all the Arduinians who have used and commented on Streaming.  Cool stuff.</p>
<p>The new library is available in the &#8220;Libraries&#8221; section or <a href="libraries/streaming">here</a>.</p>
<p>Mikal</p>
]]></content:encoded>
			<wfw:commentRss>http://arduiniana.org/2009/04/new-streaming-library/feed/</wfw:commentRss>
		</item>
		<item>
		<title>New Flash library</title>
		<link>http://arduiniana.org/2009/03/new-flash-library/</link>
		<comments>http://arduiniana.org/2009/03/new-flash-library/#comments</comments>
		<pubDate>Tue, 24 Mar 2009 16:58:38 +0000</pubDate>
		<dc:creator>Mikal</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[Arduino libraries]]></category>

		<guid isPermaLink="false">http://sundial.org/arduino/?p=232</guid>
		<description><![CDATA[I wrote a new library, Flash, which abstracts away most of the complexity of PROGMEM programming. It provides String, Array, and Table types that make ROM-based data collections as easy to use as “normal” types. Each overrides the C++ [] operator, so to get at individual elements, one simply uses familiar array syntax. For example, [...]]]></description>
			<content:encoded><![CDATA[<p>I wrote a new library, <strong>Flash</strong>, which abstracts away most of the complexity of PROGMEM programming. It provides String, Array, and Table types that make ROM-based data collections as easy to use as “normal” types. Each overrides the C++ [] operator, so to get at individual elements, one simply uses familiar array syntax. For example, if you have 1000 floating point temperatures in a flash-based “temperature_table” array, you might write code like this:</p>
<pre>for (int i=0; i&lt;temperature_table.count(); ++i)
  if (temperature_table[i] &gt; 98.6)
    Serial.println(temperature_table[i]);</pre>
<p>Interested to learn more? Read all about it <a href="/libraries/Flash">here</a>!</p>
<p>Mikal</p>
]]></content:encoded>
			<wfw:commentRss>http://arduiniana.org/2009/03/new-flash-library/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
