<?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"
	>

<channel>
	<title>Principia Labs</title>
	<atom:link href="http://principialabs.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://principialabs.com</link>
	<description>Design, build, test, iterate.</description>
	<pubDate>Sat, 05 Jul 2008 18:21:56 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<item>
		<title>Beginning SSH on Ubuntu</title>
		<link>http://principialabs.com/beginning-ssh-on-ubuntu/</link>
		<comments>http://principialabs.com/beginning-ssh-on-ubuntu/#comments</comments>
		<pubDate>Fri, 30 May 2008 01:49:02 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
		
		<category><![CDATA[linux]]></category>

		<category><![CDATA[ssh]]></category>

		<category><![CDATA[tutorial]]></category>

		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://principialabs.com/?p=102</guid>
		<description><![CDATA[So let&#8217;s say you have a private LAN running in your secret underground lab.  Maybe you&#8217;ve got a Linux box hardwired to a WiFi router, and maybe a Mac or Linux laptop floating around somewhere, and you need a quick way to transfer files or execute shell commands remotely.

What you need is SSH, the [...]]]></description>
			<content:encoded><![CDATA[<p>So let&#8217;s say you have a private <acronym title="Local Area Network">LAN</acronym> running in your secret underground lab.  Maybe you&#8217;ve got a Linux box hardwired to a WiFi router, and maybe a Mac or Linux laptop floating around somewhere, and you need a quick way to transfer files or execute shell commands remotely.</p>

<p>What you need is <a href="http://en.wikipedia.org/wiki/Secure_Shell">SSH</a>, the Secure Shell.  SSH is a powerful tool which allows secure remote login over insecure networks. It provides an encrypted terminal session with strong authentication of both the server and client using public-key cryptography.  This tutorial will cover the basics of SSH&#8217;s most useful features:</p>

<ul>
<li>Logging into a remote computer over a secure connection.</li>
<li>Transferring files and directories between computers over a secure connection.</li>
<li>Enabling public-key authentication.</li>
<li>Passwordless authentication for use with scripts and cron jobs.</li>
</ul>

<p>The following assumptions are made about the reader:</p>

<ul>
<li>You know what a terminal/command line/shell is and how to start a session.</li>
<li>You have at least a basic familiarity with Linux/Mac command-line syntax.</li>
<li>You&#8217;re on a private LAN with access to at least two Linux/Mac computers (or, you have a user account on a remote server that accepts SSH connections).</li>
</ul>

<p>As always, comments, corrections, and suggestions for improvement are appreciated.</p>

<h3>Installing OpenSSH</h3>

<p>The Ubuntu (and MacOS X) flavor of SSH is called <a href="http://www.openssh.org/">OpenSSH</a>, a free, open-source implementation of the <code>ssh</code> protocol.  It consists of two basic components, an <code>openssh-client</code> and an <code>openssh-server</code>.  SSH clients communicate with SSH servers over encrypted network connections.</p>

<p><span id="more-102"></span></p>

<p>The <code>openssh-client</code> software should already be installed by default on Ubuntu.  If you want to be able to accept SSH connections as well as request them, you&#8217;ll need the server software as well.  The easiest way to ensure you have both is simply to run:</p>

<pre><code>sudo apt-get install openssh-client openssh-server
</code></pre>

<h3>Using SSH to Log into a Remote Computer</h3>

<p>Once OpenSSH is installed, you can login to a remote SSH server by using the <code>ssh</code> command:</p>

<pre><code>ssh remoteuser@remotebox
</code></pre>

<p>where <code>remoteuser</code> is the username of the remote account you&#8217;re trying to access, and <code>remotebox</code> is the remote server&#8217;s hostname or IP address.</p>

<p>For example, if you know that your Kubuntu desktop box (now running <code>openssh-server</code>) has a user account named <code>joebanks</code> and that the IP address of that computer on your private LAN is <code>192.168.0.12</code>, you could login remotely to that account from your Linux/Mac laptop by typing:</p>

<pre><code>ssh joebanks@192.168.0.12
</code></pre>

<div class="help">
If you&#8217;re unsure of a computer&#8217;s local IP address, try running <code>ifconfig</code> on that machine.  This will display the status of the active network interfaces, and the local IP address of that device will be listed after <code>inet addr</code>.  It will most likely be in the form of <code>192.168.0.xx</code>.
</div>

<p>Or, if you&#8217;ve got a web hosting account that allows shell access (e.g., <a href="http://dreamhost.com/">DreamHost</a>) with a domain name like <code>cooldomain.com</code>, your syntax might look like:</p>

<pre><code>ssh joebanks@cooldomain.com
</code></pre>

<p>Now, the first time an SSH client encounters a new remote server, it will report that it&#8217;s never seen the machine before, by printing the following message:</p>

<pre><code>The authenticity of host 'remotebox (192.168.0.12)' can't be established.
RSA key fingerprint is 53:b4:ad:c8:51:17:99:4b:c9:08:ac:c1:b6:05:71:9b.
Are you sure you want to continue connecting (yes/no)?
</code></pre>

<p>This is just an extra security measure to ensure that you&#8217;re actually connecting to the machine you think you are.  If you type <code>yes</code> (the most common response), you&#8217;ll see the following:</p>

<pre><code>Warning: Permanently added 'remotebox' (RSA) to the list of known hosts.
</code></pre>

<p>Subsequent login attempts to this machine will omit the warning message.  You&#8217;ll then be asked for the <code>remoteuser</code>&#8217;s password:</p>

<pre><code>remoteuser@remotebox's password:
</code></pre>

<p>And after correctly entering it, like magic, you&#8217;ll be logged into the remote machine, and instead of your local machine&#8217;s command prompt, you&#8217;ll see the following:</p>

<pre><code>remoteuser@remotebox:~$
</code></pre>

<p>And, voila!  You can execute commands on the remote machine just as you would on your local box.  To close the connection to the remote server, type <code>exit</code>, or use <code>Ctrl-D</code>.</p>

<h3>Copying Files</h3>

<p>To transfer files and directories from your local machine to the remote server and vice-versa, you&#8217;ll use SSH&#8217;s &#8220;secure copy&#8221; command, or <code>scp</code>.  To copy a single file from your local machine to the server, use the following syntax:</p>

<pre><code>scp file.txt remoteuser@remotebox:/directory
</code></pre>

<p>where <code>file.txt</code> is the name of a file in the current directory of your local machine, <code>remoteuser@remotebox</code> is the username and hostname or IP address of the server (just like in the above <code>ssh</code> examples, and <code>/directory</code> is the directory path on the server where you want your file copied.</p>

<p>For example, if you want to copy the local <code>file.txt</code> to the <code>/home/joebanks/docs</code> directory on the server you logged into above, you&#8217;ll run the following command from a <em>local terminal session:</em></p>

<pre><code>scp file.txt joebanks@192.168.0.12:/home/joebanks/docs
</code></pre>

<div class="help">
By &#8220;local terminal session,&#8221; I mean that you DO NOT first <code>ssh</code> in to the remote computer and <i>then</i> run the <code>scp</code> command.  Secure copy opens the <code>ssh</code> tunnel on its own.  Since secure copy uses the <code>ssh</code> protocol for a secure connection, whenever you run the <code>scp</code> command, you&#8217;ll be prompted for a password (or passphrase) if the <code>ssh</code> connection requires it.
</div>

<p>You can be as verbose as you want with the local and remote filenames and directories, even changing the filename in the process, like so:</p>

<pre><code>scp ~/docs/oldfile.txt joebanks@192.168.0.12:/home/joebanks/docs/newfile.txt
</code></pre>

<p>To copy a file from the server to your local machine, use the following syntax:</p>

<pre><code>scp remoteuser@remotebox:file.txt /local/directory
</code></pre>

<p>where <code>remoteuser@remotebox</code> is the username and hostname or IP address of the server, <code>file.txt</code> is a file in the /home/remoteuser directory, and <code>/local/directory</code> is the local directory path into which the file will be copied.</p>

<p>Again, you can be as verbose as necessary, for example:</p>

<pre><code>scp joebanks@192.168.0.12:~/docs/newfile.txt /home/joe/downloads
</code></pre>

<h3>Copying Directories</h3>

<p>To copy an entire directory (and all of its contents) from the local machine to the remote server, use the recursive <code>-r</code> switch, like so:</p>

<pre><code>scp -r /local/directory remoteuser@remotebox:/remote/directory
</code></pre>

<p>where <code>/local/directory</code> is the path to the local directory you want copied, and <code>/remote/directory</code> is the remote directory <em>into which</em> you want the directory to be copied.</p>

<p>To copy an entire directory (and all of its contents) from the remote server to the local machine, use the following:</p>

<pre><code>scp -r remoteuser@remotebox:/remote/directory /local/directory
</code></pre>

<p>where <code>/remote/directory</code> is the path to the remote directory you want copied, and <code>/local/directory</code> is the local directory <em>into which</em> you want the directory to be copied.</p>

<h3>Stop Typing the Stupid IP Address All Day, Will You?</h3>

<p>By now you&#8217;re no doubt getting sick of typing <code>joebanks@192.168.0.12</code> or whatever. It sure would be nice to type something shorter. Let&#8217;s fix that.</p>

<p>OpenSSH uses a client configuration file, located at <code>~/.ssh/config</code>, to simplify some of the tedious typing associated with logging into remote machines.  To edit (or create) that file, we&#8217;ll use the nano text editor, but you can use vi, emacs, kate or whatever:</p>

<pre><code>nano ~/.ssh/config
</code></pre>

<p>The simplest configuration file might look something like this:</p>

<pre>
Host volcano
  HostName 192.168.0.12
</pre>

<p>This associates the Host <code>volcano</code> with the HostName (or IP address) <code>192.168.0.12</code>, so now to login you&#8217;ll only need to type:</p>

<pre><code>ssh joebanks@volcano
</code></pre>

<p>That&#8217;s cool, but let&#8217;s get a little more lazy, shall we?  How about this:</p>

<pre>
Host BigWoo
  HostName 192.168.0.12
  User joebanks
</pre>

<p>Now all we need to type is:</p>

<pre><code>ssh BigWoo
</code></pre>

<p>Far out!  You can add as much configuration data as you need to this Host, and as many different Hosts as you like.  And this shorthand will also work with all the <code>scp</code> examples:</p>

<pre><code>scp file.txt BigWoo:
</code></pre>

<p>To learn more visit the <a href="http://www.openbsd.org/cgi-bin/man.cgi?query=ssh_config">OpenSSH docs</a>, or run <code>man ssh_config</code>.</p>

<h3>Public-Key Authentication</h3>

<p>To increase the security of your SSH session, or to set up passwordless authentication, you can enable SSH&#8217;s built-in <a href="http://en.wikipedia.org/wiki/Public-key_cryptography">public-key cryptography</a>.  Then, instead of entering the <code>remoteuser</code>&#8217;s password on each login attempt, SSH will initiate a challenge-and-response protocol which attempts to match an encrypted public key (stored on the server) with a protected private key (stored on the local machine).  This completely eliminates the need to send sensitive information (like a password) over the network, encrypted or not.</p>

<p>To generate a public/private key pair on your local machine, open a terminal and type:</p>

<pre><code>ssh-keygen -t dsa
</code></pre>

<p>You&#8217;ll see the following message:</p>

<pre><code>Generating public/private dsa key pair.
Enter file in which to save the key (~/.ssh/id_dsa):
</code></pre>

<p>Hit <code>Enter</code>.  This selects the default location.  Next you&#8217;ll see:</p>

<pre><code>Enter passphrase (empty for no passphrase):
</code></pre>

<p>Enter a secure passphrase, ideally something unique and unguessable.  Unlike a password, a passphrase is usually a phrase or complete sentence, with spaces and punctuation if you like.  The longer and more obscure the phrase, the stronger it is.</p>

<div class="help">
<b>Note:</b> It is also acceptable to just hit <code>Enter</code> at this point, thereby selecting <i>no passphrase.</i>  This can be appropriate in some instances (see below), but you should be aware that it is <i>not</i> as secure.  While <code>ssh</code> will still use an encrypted public/private keypair  (which is almost certainly more secure than typing the remote user&#8217;s password like you&#8217;ve been doing), anyone gaining access to your local account will thereby also gain unfettered access to any remote hosts which recognize your public key.
</div>

<p>After typing a passphrase and hitting <code>Enter</code>, you&#8217;ll see:</p>

<pre><code>Enter same passphrase again:
</code></pre>

<p>Enter the same passphrase again.  And finally:</p>

<pre><code>Your identification has been saved in ~/.ssh/id_dsa.
Your public key has been saved in ~/.ssh/id_dsa.pub.
The key fingerprint is:
42:ac:8a:81:31:81:e5:7b:d2:01:42:2d:64:32:0f:dd localuser@localbox
</code></pre>

<p>Now copy your public key, which is stored in the local file <code>~/.ssh/id_dsa.pub</code> to the remote machine, by running the following command from a <em>local terminal session:</em></p>

<pre><code>ssh-copy-id -i ~/.ssh/id_dsa.pub remoteuser@remotebox
</code></pre>

<p>You&#8217;ll be prompted for the <code>remoteuser</code>&#8217;s password one last time, and then you&#8217;ll see the message:</p>

<pre><code>Now try logging into the machine, with "ssh 'remoteuser@remotebox'", and check in:

  .ssh/authorized_keys

to make sure we haven't added extra keys that you weren't expecting.
</code></pre>

<div class="help">
<b>MacOSX Users:</b>  If the <code>ssh-copy-id</code> method doesn&#8217;t work with your version of OpenSSH, try the following command:
<p>
<code>cat ~/.ssh/id_dsa.pub | ssh remoteuser@remotebox 'cat >> .ssh/authorized_keys'</code>
</p>
Or, if the <code>~/.ssh</code> directory doesn&#8217;t yet exist on the remote machine, you can create the directory <i>and</i> copy the public key all in one swell foop, like so:
<p>
<code>cat ~/.ssh/id_dsa.pub | ssh remoteuser@remotebox 'mkdir .ssh; cat >> .ssh/authorized_keys'</code>
</p>
</div>

<p>Once the <code>~/.ssh/authorized_keys</code> file on the remote machine contains your public key, you&#8217;ll be prompted for your passphrase at each login attempt, rather than the <code>remoteuser</code>&#8217;s system password, like so:</p>

<pre><code>Enter passphrase for key '~/.ssh/id_dsa':
</code></pre>

<p>Finally, it&#8217;s a good idea to change the permissions of the <code>~/.ssh</code> directory and the <code>~/.ssh/id_dsa</code> file on your local machine, to disable any outside access to your private key.</p>

<pre><code>chmod 700 ~/.ssh
chmod 600 ~/.ssh/id_dsa
</code></pre>

<h3>Passwordless Authentication for Automated Tasks</h3>

<p>You can use <code>ssh</code> and <code>scp</code> in shell scripts and cron jobs to automate repetitive tasks, such as remote backups of critical files.  To do so, however, you&#8217;ll need to implement some sort of passwordless authentication scheme, so that scripts can run without human intervention.</p>

<p>Two methods are presented below, the first is the easiest to implement (and possibly the most prevalent), while the second is the most secure.</p>

<h4>Method 1:  Sans Passphrase</h4>

<p>If you want your scripts to have access to the <code>ssh</code> command without requiring a password or passphrase, simply go through the steps outlined above for enabling public-key authentication, but instead of entering a passphrase when prompted, simply press <code>Enter</code>.</p>

<p>The <code>ssh-keygen</code> program will generate a public/private key pair for you that will allow password- and passphrase-less access to any remote server which has your public key stored in its <code>authorized_keys</code> file.</p>

<p><strong>Is this secure?</strong>  Well, no.  And yes.  It&#8217;s probably more secure than typing in the <code>remoteuser</code>&#8217;s password and sending it over the network.  Sure it&#8217;s encrypted, but it could still be intercepted.</p>

<p>Public-key authentication sends no password or passphrase data over the network.  The &#8220;challenge&#8221; sent by the server is encrypted with your public key, and can only be decrypted with your private key, which only you have.</p>

<p>However, as mentioned above, if someone gains access to your local computer, they&#8217;ll also have access to every remote server with your public key.</p>

<p>So, you&#8217;ll need to decide the level of security required.  In my opinion, if you&#8217;re only communicating with machines on a private LAN, under your control, behind a router&#8217;s firewall, then this method is adequate.  Others may disagree.</p>

<h4>Method 2: Using ssh-agent and keychain</h4>

<p>The &#8220;proper&#8221; and secure way to achieve passwordless authentication is by using the <code>ssh-agent</code> and <code>keychain</code> daemons to store your passphrase between terminal sessions, so you don&#8217;t need to type it every time.</p>

<p>Setup of this method is beyond the scope of this article, but the following tutorials will walk you through the entire process, as well as the theory behind it:</p>

<ul>
<li><a href="http://www.ibm.com/developerworks/library/l-keyc.html">OpenSSH key management, Part 1</a></li>
<li><a href="http://www.ibm.com/developerworks/library/l-keyc2/">OpenSSH key management, Part 2</a></li>
</ul>

<h3>Go Forth and SSHify!</h3>

<p>I hope this tutorial serves as a gentle introduction to the Secure Shell.  For further reading and advanced topics, check out the references listed below, and browse the <a href="http://www.openssh.org/manual.html">OpenSSH Documentation</a>.  Thanks for reading.</p>

<h3>References</h3>

<ol>
<li><a href="http://www.suso.org/docs/shell/ssh.sdf">SSH Tutorial for Linux</a></li>
<li><a href="https://help.ubuntu.com/community/SSHHowto">SSH: Ubuntu Community Documentation</a></li>
<li><a href="http://www.kuro5hin.org/story/2001/10/21/134817/35">Secure Communications with OpenSSH</a></li>
<li><a href="http://kimmo.suominen.com/docs/ssh/">Getting Started with SSH</a></li>
<li><a href="http://kb.iu.edu/data/agye.html">Indiana University Knowledge Base: SCP</a></li>
<li><a href="http://www.hypexr.org/linux_scp_help.php">Example Syntax for Secure Copy</a></li>
<li><a href="http://tiswww.case.edu/php/chet/bash/bashref.html">Bash Reference Manual</a></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://principialabs.com/beginning-ssh-on-ubuntu/feed/</wfw:commentRss>
		</item>
		<item>
		<title>LightScribe on Ubuntu</title>
		<link>http://principialabs.com/lightscribe-on-ubuntu/</link>
		<comments>http://principialabs.com/lightscribe-on-ubuntu/#comments</comments>
		<pubDate>Sat, 17 May 2008 22:33:31 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
		
		<category><![CDATA[linux]]></category>

		<category><![CDATA[lightscribe]]></category>

		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://principialabs.com/?p=92</guid>
		<description><![CDATA[

LightScribe is an innovative technology that uses a special disc drive, special media, and label-making software to burn labels directly onto CDs and DVDs.  The labels are laser-etched, not printed, so there&#8217;s no ink, no smudging, and no peeling.

LightScribe lets you create one-of-a-kind designs with your own photos, text, and artwork.  The days [...]]]></description>
			<content:encoded><![CDATA[<p><a href='http://www.lightscribe.com/'><img src="http://principialabs.com/wp-content/uploads/lightscribe-logo.jpg" alt="LightScribe Logo" title="lightscribe-logo" width="150" height="132" class="alignleft size-full wp-image-95" /></a></p>

<p><strong><a href="http://www.lightscribe.com/">LightScribe</a></strong> is an innovative technology that uses a special disc drive, special media, and label-making software to burn labels <em>directly</em> onto CDs and DVDs.  The labels are laser-etched, not printed, so there&#8217;s no ink, no smudging, and no peeling.</p>

<p>LightScribe lets you create one-of-a-kind designs with your own photos, text, and artwork.  The days of hand-labeling or printing stickers for your CDs and DVDs are over.</p>

<p><img src="http://principialabs.com/wp-content/uploads/lightscribe-martini.jpg" alt="" title="lightscribe-martini" width="140" height="140" style="float:right; padding-left: 10px;" /></p>

<p>This short tutorial will describe how to install and run LightScribe software on Ubuntu.  These instructions are tailored specifically for Ku/Xu/Ubuntu 64-bit users, since the LightScribe software is designed for the 32-bit architecture.  Where necessary, alterations for 32-bit users are included.</p>

<h3>What You Need</h3>

<p>Before downloading anything, make sure you have the necessary hardware and materials at hand, or you may have to make an emergency trip to your local big-box electronics store.  </p>

<p><strong>LightScribe hardware</strong></p>

<p>LightScribe-enabled disc drives do double duty. The same laser that burns your data will also laser-etch your customized CD/DVD labels.   <a href="http://www.newegg.com/Product/ProductList.aspx?Submit=ENE&amp;N=40000005&amp;Description=lightscribe&amp;name=CD+%2f+DVD+Burners">LightScribe-enabled CD/DVD burners</a> are ubiquitous these days.  You may already have one.</p>

<p><span id="more-92"></span></p>

<p>Just look for the LightScribe logo on the drive bay door:</p>

<div style="text-align: center;">
<img src="http://principialabs.com/wp-content/uploads/lightscribe-burner.jpg" alt="LightScribe Burner" title="lightscribe-burner" width="190" height="198" class="alignnone size-full wp-image-98" />
</div>

<p><strong>LightScribe media</strong></p>

<p><a href="http://www.newegg.com/Product/ProductList.aspx?Submit=ENE&amp;N=+40000071&amp;Configurator=&amp;Subcategory=-1&amp;description=lightscribe&amp;Ntk=&amp;srchInDesc=">LightScribe CDs and DVDs</a> have a special coating that interacts with the laser in your LightScribe-enabled disc drive. You must use LightScribe CDs and DVDs in order to burn a label onto your discs.</p>

<div style="text-align: center;">
<img src="http://principialabs.com/wp-content/uploads/lightscribe-cd-r.jpg" alt="LightScribe CD-R" title="lightscribe-cd-r" width="300" height="166" class="alignnone size-full wp-image-97" />
</div>

<p><strong>LightScribe software</strong></p>

<p>LightScribe software may have come packaged with your CD/DVD burner, and different flavors are available from a variety of vendors online.  Unfortunately, they&#8217;re all for Windows.  For Linux, we&#8217;ll be using basically two programs: (1) the LightScribe System Software, which handles the low-level system tasks like communicating with your disc drive, and; (2) the Lacie LightScribe Labeler for Linux, or <code>4L</code> for short.</p>

<div style="text-align: center;">
<img src="http://principialabs.com/wp-content/uploads/4l-gui.jpg" alt="4L-gui" title="4l-gui" width="300" height="338" class="alignnone size-full wp-image-99" />
</div>

<h3>Installing the Software</h3>

<p><strong>1.  Download</strong> the LightScribe System Software using the following command, or get the most current version from the <a href="http://lightscribe.com/downloadSection/linux/">LightScribe Downloads</a> page.  Open a terminal and paste the following code:</p>

<pre>
wget http://download.lightscribe.com/ls/lightscribe-1.12.37.1-linux-2.6-intel.deb
</pre>

<p><strong>2. Download</strong> the Lacie LightScribe Labeler for Linux (4L).</p>

<p>from here:</p>

<pre>
wget http://principialabs.com/files/4l_1.0-r6_i386.deb
</pre>

<p>or here:</p>

<pre>
wget http://uploads.mitechie.com/lightscribe/4l_1.0-r6_i386.deb
</pre>

<p><strong>3.  Install</strong> the LightScribe System Software.  <em>Important: You must install this first, before installing 4L!</em>  Open a terminal and paste the following code, but be sure the package name matches the one you downloaded from the LightScribe website (e.g. <code>lightscribe-1.12.37.1-linux-2.6-intel.deb</code>).  [Note:  For 32-bit users, simply remove the <code>--force-architecture</code> switch from the command.]
<pre>
sudo dpkg --force-architecture -i lightscribe-1.12.37.1-linux-2.6-intel.deb
</pre></p>

<p><strong>4.  Install</strong> 4L, the Lacie LightScribe Labeler for Linux.  <em>Important: You must install the LightScribe System Software first, or this won&#8217;t work!</em>  [Note:  For 32-bit users, simply remove the <code>--force-architecture</code> switch from the command.]
<pre>
<code>sudo dpkg --force-architecture -i 4l_1.0-r6_i386.deb</code>
</pre></p>

<h3>Running the Lacie LightScribe Labeler</h3>

<p>The graphical user interface to 4L is called <code>4L-gui</code> and can be run from the command line.  It must be run as the root user, like so:</p>

<pre>
sudo 4L-gui
</pre>

<p>This will launch the 4L GUI pictured above.  The interface is fairly intuitive, but the basic procedure is:</p>

<ol>
<li>Insert LightScribe media into your disc drive, <em>label side down!</em></li>
<li>Select an image to burn onto the CD or DVD by using the &#8220;Import Image&#8221; button.</li>
<li>Adjust the image size and alignment as necessary using the scale slider.</li>
<li>Preview the finished product by pressing the &#8220;Print&#8221; button and then selecting &#8220;Preview.&#8221;</li>
<li>Press &#8220;Print&#8221; to burn the label to the disc.  A full-size image should take about 20 minutes.</li>
<li>Remove the CD/DVD media and FLIP!</li>
<li>Use K3b (or your favorite burner program) to burn data on your new hella-cool custom disc!</li>
</ol>

<p><strong>Burn - Flip - Burn!</strong></p>

<p>One final technical note:  Unfortunately, the installation process above does not create a new item in your programs menu.    If you&#8217;d like to create an item in your program menu for the LightScribe labeler, check out <a href="http://ubuntuforums.org/showthread.php?t=520317">this thread on the Ubuntu Forums</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://principialabs.com/lightscribe-on-ubuntu/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Building Boarduino</title>
		<link>http://principialabs.com/building-boarduino/</link>
		<comments>http://principialabs.com/building-boarduino/#comments</comments>
		<pubDate>Sat, 26 Apr 2008 18:05:33 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
		
		<category><![CDATA[electronics]]></category>

		<category><![CDATA[adafruit]]></category>

		<category><![CDATA[arduino]]></category>

		<category><![CDATA[projects]]></category>

		<guid isPermaLink="false">http://principialabs.com/?p=90</guid>
		<description><![CDATA[I recently soldered up a Boarduino from Adafruit Industries.  Boarduino is simply an Arduino clone with a smaller form factor, designed to plug directly into a breadboard rather than giving you the female headers of the original.  I thought I&#8217;d post a few photos of the process.





I really like the idea of the [...]]]></description>
			<content:encoded><![CDATA[<p>I recently soldered up a Boarduino from <a href="http://adafruit.com/">Adafruit Industries</a>.  Boarduino is simply an <a href="http://arduino.cc/">Arduino</a> clone with a smaller form factor, designed to plug directly into a breadboard rather than giving you the female headers of the original.  I thought I&#8217;d post a few photos of the process.</p>

<div style="text-align: center;">
<a href="http://www.flickr.com/photos/aerocapture/2422080500/" title="Adafruit Boarduino by aerocapture, on Flickr"><img src="http://farm3.static.flickr.com/2181/2422080500_cb4a1f1114.jpg" width="500" height="375" alt="Adafruit Boarduino" /></a>
</div>

<p>I really like the idea of the Boarduino, because I found I was doing almost all of my prototyping on a  breadboard, and it seemed like I was always trying to figure out new and different <a href="/wp-content/uploads/arduino-breadboard.jpg">ways to anchor</a> the big Arduino down.</p>

<p><span id="more-90"></span></p>

<p>To get the size down, Boarduino makes a couple of design changes, most notably the elimination of the female headers on the top of the board, in exchange for the male headers on the bottom, which then plug directly into a breadboard, rather than having a rat&#8217;s nest of jumper wires running from the Arduino to the board.</p>

<div style="text-align: center;">
<a href="http://www.flickr.com/photos/aerocapture/2422080506/" title="Arduino NG and Boarduino by aerocapture, on Flickr"><img src="http://farm4.static.flickr.com/3281/2422080506_c9b9240048.jpg" width="500" height="375" alt="Arduino NG and Boarduino" /></a>
</div>

<p>Boarduino also eliminates the USB port and the associated USB chip, much like the <a href="http://www.arduino.cc/en/Main/ArduinoBoardMini">Arduino Mini</a>.  Instead, to program the board you need either a <a href="http://www.adafruit.com/index.php?main_page=product_info&amp;cPath=19&amp;products_id=70">USB-TTL cable</a>, which plugs into the six-pin header at the end of the board, or an FTDI breakout board like the <a href="http://www.arduino.cc/en/Main/MiniUSB">MiniUSB</a>.  </p>

<p>Both the Arduino Mini and Boarduino are designed to plug into a breadboard.  The main difference between the two is that the Mini uses a permanently-soldered surface-mount chip, whereas the Boarduino uses a 28-pin socket and <acronym title="Dual Inline Package">DIP</acronym> chip, so if you blow one, you just spend six bucks and <a href="http://www.adafruit.com/index.php?main_page=product_info&amp;cPath=19&amp;products_id=56">pop in a new one</a>, rather than buying a whole new Mini.  In addition, the Arduino Mini lacks Boarduino&#8217;s 9V barrel jack and voltage regulator, so you have to design that circuit yourself.  Plus, the Boarduino is simply cooler because you get to <em>build</em> it yourself!</p>

<div style="text-align: center;">
<a href="http://www.flickr.com/photos/aerocapture/2419682593/" title="The Lab by aerocapture, on Flickr"><img src="http://farm3.static.flickr.com/2115/2419682593_16886f4944.jpg" width="500" height="375" alt="The Lab" /></a>
</div>

<p>The first step is getting your work area all set up, as shown in the image above.  (The WES51 really ties the room together does it not?)</p>

<div style="text-align: center;">
<a href="http://www.flickr.com/photos/aerocapture/2419680469/" title="Boarduino Solder Joints by aerocapture, on Flickr"><img src="http://farm4.static.flickr.com/3192/2419680469_b485dbd90d.jpg" width="500" height="367" alt="Boarduino Solder Joints" /></a>
</div>

<p>Check out the great solder joints done by the WES51.  I used a small, stiff watercolor paintbrush and isopropyl alcohol to clean the rosin flux off the board and joints after soldering, leaving a nice, clean-looking board.</p>

<div style="text-align: center;">
<a href="http://www.flickr.com/photos/aerocapture/2420495394/" title="&amp;quot;Yeah, it lights up.&amp;quot; by aerocapture, on Flickr"><img src="http://farm3.static.flickr.com/2105/2420495394_d46d4d5b67.jpg" width="500" height="391" alt="&amp;quot;Yeah, it lights up.&amp;quot;" /></a>
</div>

<p style="text-align: center;">Power supply finished and tested, in this case with the USB-TTL cable.</p>

<div style="text-align: center;">
<a href="http://www.flickr.com/photos/aerocapture/2422030032/" title="16 MHz Ceramic Oscillator by aerocapture, on Flickr"><img src="http://farm3.static.flickr.com/2348/2422030032_925ddeac79.jpg" width="500" height="375" alt="16 MHz Ceramic Oscillator" /></a>
</div>

<p style="text-align: center;">Note that the Boarduino uses a 16MHz <i>ceramic</i> oscillator rather than a crystal.  This is slightly less accurate, but only on a nanosecond scale, and not relevant for most projects.</p>

<div style="text-align: center;">
<a href="http://www.flickr.com/photos/aerocapture/2422030058/" title="Time for the Socket by aerocapture, on Flickr"><img src="http://farm4.static.flickr.com/3234/2422030058_0a1ba4bf0c.jpg" width="500" height="375" alt="Time for the Socket" /></a>
</div>

<p style="text-align: center;">Ready to install the 28-pin socket.</p>

<div style="text-align: center;">
<a href="http://www.flickr.com/photos/aerocapture/2421249267/" title="Headers Soldered by aerocapture, on Flickr"><img src="http://farm3.static.flickr.com/2256/2421249267_499b9889c4.jpg" width="500" height="375" alt="Headers Soldered" /></a>
</div>

<p style="text-align: center;">Socket and headers soldered in.</p>

<div style="text-align: center;">
<a href="http://www.flickr.com/photos/aerocapture/2421249271/" title="The ATmega168 Microcontroller by aerocapture, on Flickr"><img src="http://farm4.static.flickr.com/3148/2421249271_a1ebf0eede.jpg" width="500" height="375" alt="The ATmega168 Microcontroller" /></a>
</div>

<p style="text-align: center;">Behold the AVR ATmega168 microcontroller.</p>

<div style="text-align: center;">
<a href="http://www.flickr.com/photos/aerocapture/2421249275/" title="Inserting the ATmega168 by aerocapture, on Flickr"><img src="http://farm3.static.flickr.com/2239/2421249275_b7e2d6d7dc.jpg" width="500" height="375" alt="Inserting the ATmega168" /></a>
</div>

<p style="text-align: center;">Inserting the ATmega168.</p>

<div style="text-align: center;">
<a href="http://www.flickr.com/photos/aerocapture/2422080494/" title="Power and USB FTDI Applied by aerocapture, on Flickr"><img src="http://farm3.static.flickr.com/2260/2422080494_28c0b47a92.jpg" width="500" height="375" alt="Power and USB FTDI Applied" /></a>
</div>

<p style="text-align: center;">Boarduino completed, powered up and ready to go.</p>

<p>Can&#8217;t get enough of those close-up solder pix?  Check out <a href="http://flickr.com/photos/aerocapture/tags/boarduino/">the rest of my Boarduino photos</a> on Flickr.  </p>
]]></content:encoded>
			<wfw:commentRss>http://principialabs.com/building-boarduino/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Soldering Tutorials</title>
		<link>http://principialabs.com/soldering-tutorials/</link>
		<comments>http://principialabs.com/soldering-tutorials/#comments</comments>
		<pubDate>Mon, 14 Apr 2008 19:31:38 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
		
		<category><![CDATA[electronics]]></category>

		<category><![CDATA[soldering]]></category>

		<guid isPermaLink="false">http://principialabs.com/?p=84</guid>
		<description><![CDATA[
image: Randomskk / cc by-sa

My Weller WES51 arrived today (w00t!), and in celebration, I thought I&#8217;d compile a list of my favorite soldering tutorials around the web.

How to Solder Correctly: An excellent starting point, thanks to a detailed seven-minute video and lots of close-up images.

Soldering Tips (PDF, 284K): Ten pages of required reading by Tom [...]]]></description>
			<content:encoded><![CDATA[<div style="float:right;padding-left:10px;text-align: right;font-size: 10px;"><img src="http://principialabs.com/wp-content/uploads/soldering-300x232.jpg" alt="" title="soldering" width="300" height="232" class="alignnone size-medium wp-image-86" /></a><br />
image: <a href="http://flickr.com/photos/randomskk/943039047/">Randomskk</a> / <a href="http://creativecommons.org/licenses/by-sa/2.0/deed.en">cc by-sa</a></div>

<p>My <a href="http://www.testequipmentdepot.com/weller/images/wes51.jpg">Weller WES51</a> arrived today (w00t!), and in celebration, I thought I&#8217;d compile a list of my favorite soldering tutorials around the web.</p>

<p><a href="http://www.curiousinventor.com/guides/How_To_Solder">How to Solder Correctly</a>: An excellent starting point, thanks to a detailed seven-minute video and lots of close-up images.</p>

<p><a href="http://principialabs.com/wp-content/uploads/soldering.pdf">Soldering Tips</a> (PDF, 284K): Ten pages of required reading by Tom Hammond, with advice on tool selection, tip tinning, component positioning, and solder types.  Lots of great diagrams for all of us right-brained learners.</p>

<p><a href="http://www.epemag.wimborne.co.uk/solderfaq.htm">Basic Soldering Guide</a>: From <em>Everyday Practical Electronics</em> magazine, discusses tool selection, soldering methods, and &#8212; perhaps more importantly &#8212; <em>de-soldering!</em></p>

<p><a href="http://www.sparkfun.com/commerce/present.php?p=BEE-6-SolderingBasics">Soldering Basics</a>: This detailed tutorial from SparkFun.com includes several short videos and lots of pictures, then lets you <em>really</em> get your hands dirty with step-by-step instructions on soldering up a basic RS232 shifter board kit.</p>

<p><a href="http://www.curiousinventor.com/guides/Surface_Mount_Soldering">Surface-Mount Soldering</a>:  More and more components and ICs are shrinking in size and doing away with through-hole pinouts.  Just go easy on the coffee and <em>you too</em> can solder SMDs!</p>

<p><a href="http://www.sparkfun.com/commerce/present.php?p=SMD-HowTo-1">Basic SMD Soldering</a>: A whopping 8-part solder-a-thon from SparkFun.  Starts with tools, moves into surface-mount soldering techniques, then takes it up a notch with hot-air rework &#8212; for when you mess up.</p>

<p><span id="more-84"></span></p>

<p><a href="http://www.curiousinventor.com/guides/Surface_Mount_Soldering/Solder_Paste_and_Toaster_Oven">Solder Paste and a Toaster Oven</a>: When you have a large batch of PCBs with surface-mount parts, it could be time to ditch the iron and warm up the oven. </p>

<p><a href="http://www.sparkfun.com/commerce/present.php?p=Reflow%20Toaster">Hacking up a Reflow Oven</a>: More crazy antics from the kids at SparkFun.  Take a shiny new $50 toaster oven, rip the guts out and throw in a microcontroller.  Insert pasted PCBs.  Bake for 4 minutes.  Let cool and enjoy.</p>

<p><a href="http://www.sparkfun.com/commerce/present.php?p=Stenciling">Solder Paste Stenciling</a>: Before those suckers go in the oven, you gotta get the goop on somehow.</p>

<p><a href="http://www.ladyada.net/rant/2006/08/duel-nature-time-to-bake-the-pcbs/">Stenciling and Reflowing</a>: With your host, the ladyada herself, making it look easy.</p>

<p><a href="http://www.sparkfun.com/commerce/present.php?p=Reflow%20Skillet#Toasting">Did he say &#8220;Reflow Skillet?&#8221;</a>: No cash or time to build an oven?  Shell out 29 bucks for a cheap electric skillet and be on your way to SMD heaven.  Now these guys have <em>really</em> gone off the deep end.</p>

<p><a href="http://www.curiousinventor.com/forums/3">Soldering Forum</a>:  Still not satisfied?  Ask all your soldering-related questions on Curious Inventor&#8217;s forum.</p>

<p>Let me know if I&#8217;ve missed anybody!</p>
]]></content:encoded>
			<wfw:commentRss>http://principialabs.com/soldering-tutorials/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Arduino-Python 4-Axis Servo Control</title>
		<link>http://principialabs.com/arduino-python-4-axis-servo-control/</link>
		<comments>http://principialabs.com/arduino-python-4-axis-servo-control/#comments</comments>
		<pubDate>Tue, 08 Apr 2008 17:46:29 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
		
		<category><![CDATA[electronics]]></category>

		<category><![CDATA[arduino]]></category>

		<category><![CDATA[python]]></category>

		<category><![CDATA[serial]]></category>

		<category><![CDATA[servo]]></category>

		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://principialabs.com/?p=69</guid>
		<description><![CDATA[



Although the Arduino platform is ideal for standalone applications, it really comes to life when interfaced with a PC.  Connect Arduino to a personal computer and you instantly add a ton of versatility and processing power to your project.  

This tutorial will describe how to use Arduino to control a bank of four [...]]]></description>
			<content:encoded><![CDATA[<div class="video">
<embed src="http://blip.tv/play/wkew8g0A" type="application/x-shockwave-flash" width="380" height="300" allowscriptaccess="always" allowfullscreen="true"></embed>
</div>

<p>Although the <a href="http://arduino.cc/">Arduino</a> platform is ideal for standalone applications, it really comes to life when interfaced with a PC.  Connect Arduino to a personal computer and you instantly add a ton of versatility and processing power to your project.  </p>

<p>This tutorial will describe how to use Arduino to control a bank of four independent RC servos with your PC (or Mac, or *nix Box), using a USB cable and a modular Arduino-Python software stack.</p>

<p>The following discussion builds upon concepts presented in two previous articles, &#8220;<a href="/arduino-serial-servo-control/">Arduino Serial Servo Control</a>&#8221; and &#8220;<a href="/joystick-control-of-a-servo/">Joystick Control of a Servo</a>.&#8221;  As always, comments, critiques, or suggestions for improving or adapting this code are welcome and appreciated.</p>

<h4>Project Outline</h4>

<p>The primary goal for this project was to create a software stack that allows simple and flexible control of multiple servos from any type of Python script.</p>

<p>The solution has two basic components: (1) an Arduino sketch that waits for serial input from a connected PC, then moves each servo to its commanded position, and; (2) a Python module on the PC that opens the serial connection and formats the data packets expected by the Arduino.</p>

<p>Any other Python program written to sit on <em>top</em> of these two layers need not worry about the messy details of serial communication, but rather can just say something like, &#8220;Move servo #2 to 90 degrees.&#8221;  Or, more precisely:</p>

<pre><code>servo.move(2,90)
</code></pre>

<p>Easy, right?  Let&#8217;s get started.</p>

<p><span id="more-69"></span></p>

<h2>Part I:  Smoke, Mirrors, and Hand-Waving</h2>

<p>If you just want to get things up and running quickly, start here.  These instructions will get your servos connected and obeying every whim of your PC in no time.</p>

<h4>Hardware Setup</h4>

<p>Hardware for this project consists of an Arduino module, four <a href="http://www.horizonhobby.com/Products/Default.aspx?ProdID=JSP20050">JR Sport ST47</a> standard servos, and a breadboard to create the circuit.</p>

<p>The servos each have three wires: Ground (brown), Power (red) and Control (yellow).  Each of the Control wires will connect to a different digital pin on the Arduino board (pins 2 through 5 in our setup), and <em>all</em> of the Power and Ground wires will need to connect somehow to the 5V and Gnd pins.</p>

<div style="text-align:center;"><a href='http://principialabs.com/wp-content/uploads/arduino-breadboard.jpg'><img src="http://principialabs.com/wp-content/uploads/arduino-breadboard.thumbnail.jpg" alt="" title="Breadboard: click to enlarge" /></a></div>

<p>The simplest way to accomplish this is to create a &#8220;bus&#8221; bar along one of the breadboard&#8217;s edges, as shown in the photo above. Simply route the Arduino&#8217;s 5V and Gnd to a convenient area on the breadboard, and connect all the servos.</p>

<h4>Required Software: The Lower Layers</h4>

<p>To get the effects seen in the video above, you&#8217;ll need at least the following two programs.  Although this code is designed to control four servos, it also works as-is with <em>fewer</em> servos, and &#8212; with a few modifications &#8212; as many as twelve.</p>

<p><strong>Download the code:</strong></p>

<div style="padding-left:20px;">

<p><a href='http://principialabs.com/wp-content/uploads/MultipleServos.pde'><b>MultipleServos.pde</b></a>: This is the Arduino sketch.  Copy and paste this code into your <a href="http://www.arduino.cc/en/Main/Software">Arduino IDE software</a> and upload it to the board.</p>

<p><a href='http://principialabs.com/wp-content/uploads/servo.py'><b>servo.py</b></a>: This is the Python module which talks directly to the Arduino sketch &#8220;MultipleServos.&#8221;  This script requires the <a href="http://pyserial.sourceforge.net/">pyserial</a> module, available from Sourceforge. Save this script on your PC wherever you like, just be sure to name it &#8220;servo.py&#8221;.</p>

</div>

<div class="help">
<b>New to Python?</b> Welcome!  Python is a versatile and fun language to learn, and it&#8217;s used by just about everyone, from newbies to NASA!  Check out the <a href="http://wiki.python.org/moin/BeginnersGuide">Beginner&#8217;s Guide</a>  to get your bearings, or get the full skinny at <a href="http://python.org/">python.org</a>.
</div>

<p><strong>Customize the code:</strong></p>

<p>Depending on your computer system and Arduino hardware setup, you may need to make a few modifications to the code.</p>

<p><strong>Arduino:</strong> In the &#8220;MultipleServos&#8221; sketch, take note of the following three variables and make adjustments as necessary for your setup.  See &#8220;<a href="/arduino-serial-servo-control/">Arduino Serial Servo Control</a>&#8221; for more details regarding the <code>minPulse</code> and <code>maxPulse</code> variables.</p>

<pre><code>int pinArray[4] = {2, 3, 4, 5}; // digital pins for the servos
int minPulse = 600;             // minimum servo position
int maxPulse = 2400;            // maximum servo position
</code></pre>

<p><strong>Python:</strong>  In the &#8220;servo.py&#8221; script, you&#8217;ll most likely need to change the value of the <code>usbport</code> variable, which tells Python how to find your Arduino (On Windows, it&#8217;ll be something like &#8216;COM5&#8242;. On a Mac, &#8216;/dev/tty.usbserial-xxxxx&#8217;.  On Linux, &#8216;/dev/ttyUSB0&#8242;.).  Try running <code>ls /dev/tty*</code> from a Mac or Linux terminal for a list of available ports.  [ToDo: Modify the script to make this step unnecessary.]</p>

<p><strong>Test the code:</strong></p>

<p>Once your hardware is set up and the software is installed, you can test the system&#8217;s basic functionality from the <a href="http://programming-crash-course.com/the_python_interactive_interpreter">Python interactive interpreter</a>, like so:</p>

<pre><code>~/path/to/servo.py$ python
&gt;&gt;&gt; import servo
&gt;&gt;&gt; servo.move(2,150)
</code></pre>

<p>The <code>servo.move()</code> method takes two arguments, both integers.  The first is the servo number you wish to move, 1-4.  The second is the commanded angular position of the servo horn, from 0-180 degrees.  So, if you want to move Servo #3 fully clockwise (180 degrees), you&#8217;ll type <code>servo.move(3,180)</code>.  Cake, baby!</p>

<h4>Optional Software: From Totally Geek to Totally Chic</h4>

<p>The following scripts are designed to leverage the functionality of the <code>servo.move()</code> method for simple and readable code.  Make sure these files reside in the same directory as &#8220;servo.py&#8221;.</p>

<ul style="list-style-type: none; padding-left: 20px;">

<li><a href='http://principialabs.com/wp-content/uploads/servodance.py'><b>servodance.py</b></a>:  A cascading effect that feels like watching a quarter spiral down one of those funnel-shaped wishing wells.</li><br />

<li><a href='http://principialabs.com/wp-content/uploads/multijoystick.py'><b>multijoystick.py</b></a>: Allows joystick control of the servos, with each joystick axis controlling a single servo.  This code could the basis for a Wi-Fi RC vehicle of some kind.</li><br />

<li><a href='http://principialabs.com/wp-content/uploads/servorandom.py'><b>servorandom.py</b></a>: The final servo sequence seen in the video, with individual servos moving to random positions and then waving &#8220;goodbye&#8221; in unison.</li></ul>

<p>With any luck, you should now have everything up and running just like in the video!</p>

<div style="border-top:1px solid #ddd;margin:40px 140px;">
</div>

<h2>Part II:  Getting Down to Brass Tacks</h2>

<p>Next, let’s take a look under the hood to see how it all works.  If you&#8217;re the type that just wants to get things working and damn the details, <strong>STOP HERE</strong>.  Otherwise, continue on, and I&#8217;ll do my best to explain how the code &#8220;do what it do.&#8221;</p>

<h4>The Problem Set</h4>

<p>Asynchronous serial communication is not perfect.  Sometimes there are errors,  dropped packets, confusion.  Sometimes the mail does <em>not</em> get through.  In both of the previous two serial/servo projects, the Arduino expected only one byte from the PC, and in both cases that byte represented a commanded servo position &#8212; and nothing more.  If a byte was missed or skipped, it wasn&#8217;t a big deal, another one was sure to come along, and it was impossible to misinterpret.</p>

<p>This project presents a couple of new challenges.  First, we are controlling more than one servo, so the Arduino needs more than one command element for each move.  As we&#8217;ve seen above, it needs to know (at least) <em>which</em> servo to move, and <em>how much</em> to move it.  Secondly, we have the problem of communication.  This time, we&#8217;re sending <em>two</em> command elements for each move (servo number &amp; position), and these elements are clearly <em>not</em> interchangable. That is, if we want to send <code>servo.move(4,90)</code>, we need to make sure that Arduino knows that the &#8216;4&#8242; means &#8220;Servo #4&#8243; and the &#8216;90&#8242; means &#8220;90 degrees.&#8221;</p>

<p>Tom Igoe&#8217;s article, &#8220;<a href="http://www.tigoe.net/pcomp/code/serial-communication/interpreting-serial-data-bytes">Interpreting Serial Data</a>,&#8221; contains an excellent discussion of some of the problems involved in serial communication, and lists several issues that need to be addressed in every project, namely:</p>

<blockquote>
  <ol>
  <li>How many bytes am I sending? Am I receiving the same number?</li>
  <li>Did I get the bytes in the right order?</li>
  <li>Are my bytes part of a larger variable?</li>
  <li>Is my data getting garbled in transit?</li>
  </ol>
</blockquote>

<p>The Arduino&#8217;s <code>Serial.read()</code> function reads one byte of data at a time from its <em>serial buffer</em>.  Think of the serial buffer as a mailbox.  It&#8217;s a small (128 bytes) area of memory where incoming serial messages are stashed until the Arduino is ready to read them.  Every character we send from the PC to Arduino is one byte.  So, while we could send the Arduino something very unambiguous like, &#8220;Yeah, hi, Arduino, it&#8217;s the Linux Box again.  What&#8217;s happening?  If you could go ahead and move Servo #4 to the 90-degree position, that would be great.  Thaaanks,&#8221; (163 bytes) it&#8217;s obviously better if we can come up with something a little more terse.</p>

<p>However, as we&#8217;ve seen, if we just send over the characters &#8216;4&#8242;, &#8216;9&#8242;, and &#8216;0&#8242; &#8212; remember, each character is a byte &#8212; the Arduino might get confused.  This problem is amplified when more commands start stacking up in the buffer.  Let&#8217;s say now we command <code>servo.move(2,180)</code> and <code>servo.move(3,120)</code>.  Now the buffer should hold {4,9,0,2,1,8,0,3,1,2,0}, except&#8211;OOPS!&#8211;one of the bytes got dropped along the way, so now it holds {4,9,0,2,1,8,3,1,2,0}.  &#8220;Wait, which servo did you want me to move?&#8221;  You can clearly see a problem developing.</p>

<h4>Solution: Data Packets and Start Bytes</h4>

<p>Luckily, part of the solution is handled in the way Arduino communicates.  Arduino uses <a href="http://en.wikipedia.org/wiki/ASCII">ASCII</a> encoding to represent alphanumeric characters.  Each character sent over the wire is converted to the binary equivalent of a decimal value from 0 to 255.  [See this <a href="http://www.arduino.cc/en/Reference/ASCIIchart">conversion chart</a> for specifics.]</p>

<p>So, for example, if we send over the character &#8216;A&#8217;, Arduino recognizes this as its decimal value, &#8216;65&#8242;.  We won&#8217;t get too deep into this concept except to say that the implementation is <em>great</em> for our application, because as long as the values we&#8217;re sending are less than 255, they&#8217;ll fit neatly into one byte.  Since the largest value we send is 180, we only have to send two bytes per command.</p>

<p>Now, if you&#8217;ve looked at the ASCII conversion chart, you&#8217;ll recognize that doing this every time you want to send a command would be a real pain.  Also, trying to teach Python this chart would take up a lot of unnecessary code.  Thankfully, this problem is already solved for us with Python&#8217;s <code>chr()</code> function.  Wrap any decimal value from 0-255 in <code>chr()</code>, and you get back its ASCII equivalent.  A few examples:</p>

<pre><code>~$ python
&gt;&gt;&gt; chr(65)
'A'
&gt;&gt;&gt; chr(110)
'n'
&gt;&gt;&gt; chr(13)
'\r'
&gt;&gt;&gt; chr(9)
'\t'
</code></pre>

<p>You get the idea, but notice that ASCII doesn&#8217;t just represent letters and numbers, but also symbols and other &#8220;control&#8221; or &#8220;non-printing&#8221; characters like line-feeds, returns, and tabs.</p>

<p>So, now if we want to send <code>servo.move(4,90)</code>, we only need <em>two</em> bytes, the ASCII equivalents of &#8216;4&#8242; and &#8216;90&#8242;, represented in Python as <code>chr(4)</code> and <code>chr(90)</code>, and interpreted by the Arduino sketch as, once again, simply &#8216;4&#8242; and &#8216;90&#8242;.  Easy!  [Seriously, if your brain explodes at this point, or you're bleeding from the ears, it's understandable.  I don't like it any more than you do, but stick with me, it'll all work out neatly in the end.]</p>

<p><strong>Packets, Headers, and Payloads</strong></p>

<p>Okay, great, now instead of just digits in Arduino&#8217;s serial buffer, we have meaningful values.  Part of the problem is solved, but we still haven&#8217;t addressed the issue of dropped or missing bytes.  That is, how will the Arduino know that a &#8216;4&#8242; is &#8220;Servo #4&#8243; and not &#8220;4 degrees&#8221; when pulling values out of a crowded buffer like {4,90,2,180,3,0,1,110} ?</p>

<p>The answer is <a href="http://computer.howstuffworks.com/question525.htm">data packets</a>.  Very simply, instead of just sending a long string of numbers to Arduino, we&#8217;ll send a very specific ordered message, a <em>packet</em> of values, that is intended to be read and interpreted <strong>as a whole</strong> and <strong>in order</strong>, or else discarded completely.</p>

<p>Now, the structure of a packet can be as simple or as complex as we need it to be, as you might have noticed if you followed that last link.  But all we really need is some means of ensuring that Arduino doesn&#8217;t confuse one value for another.</p>

<p>Essentially, our Python script needs to tell Arduino three things:</p>

<ol>
<li>Here comes a new servo command.</li>
<li>Servo number to move.</li>
<li>Commanded servo position.</li>
</ol>

<p>We&#8217;ve already been sending the last two elements, the servo number and position.  Here, we&#8217;re adding a third element, which we&#8217;ll call the <em>header</em> or the <em>start byte</em>.  Our header, like the rest of the data in our packet, will be just one byte long, and contain no real information other than the conceptual message, &#8220;I am a header.&#8221;</p>

<p>The <em>order</em> of this message is important.  Every packet sent over the wire, or read from the serial buffer, will now have the following format:</p>

<pre><code>(Header, Servo Number, Servo Position)
</code></pre>

<p>or, more tersely:</p>

<pre><code>(startbyte, servo, angle)
</code></pre>

<p>What to use as a startbyte?  Well, we&#8217;re only using the values from 0-180 as either our Servo Number or Servo Postion.  Any value from 181 to 255 would be unique.  We&#8217;ll use &#8216;255&#8242; just to make it obvious.  So, every packet will now look something like one of the following:</p>

<pre><code>(255, 1, 90)
(255, 2, 180)
(255, 3, 0)
</code></pre>

<p>And the Arduino&#8217;s serial buffer would look something like:</p>

<pre><code>{255,1,90,255,2,180,255,3,0}
</code></pre>

<p>Now, instead of reading byte after byte and hoping for the best, Arduino will <em>wait</em> until a minimum of three bytes arrive in the buffer, and then read the first byte to determine whether or not it is, in fact, a header (255).  If it&#8217;s not, Arduino skips that value, and moves on to the next byte without touching the servos.  When it finally sees a header, Arduino continues reading the next two bytes, in order, and assigning them to the Servo Number and the Servo Position, respectively.  If either of <em>those</em> two values is &#8216;255&#8242;, Arduino assumes something is wrong, and skips everything until it reads a new header.</p>

<p><strong>Side Note:  Authoritarian Flow Control</strong></p>

<p>&#8220;Now just a minute!&#8221; you&#8217;re saying.  &#8220;If that is the case, then <em>some</em> of the commands Python sends to the Arduino will be totally ignored!&#8221;  And you&#8217;re right.  This method of serial flow control is definitely one-way, with no error-checking.  Other methods, such as &#8220;call-and-response&#8221; or &#8220;<a href="http://itp.nyu.edu/physcomp/Labs/Serial">handshaking</a>&#8221; are much better at ensuring accuracy, since there&#8217;s a back-and-forth arrangement that can call for data to be re-sent in the event of dropped packets.  But the two-way protocol this method requires is <em>much</em> slower.</p>

<p>We have to make an engineering decision.  In our application, which is more important, accuracy or quick response?  It depends on exactly how you are using the servos, but if you consider say, a joystick-controlled robot or RC vehicle application, then clearly an immediate response and quick visual feedback is preferable to perfect accuracy.  If you command &#8220;turn right&#8221; with a joystick, and your vehicle doesn&#8217;t respond appropriately, you&#8217;ll just instinctively add more right stick input.</p>

<p>Perfect accuracy is not required.</p>

<h4>Writing the Code</h4>

<p>Very briefly, let&#8217;s look at how the above concepts are implemented in both the Python and Arduino software.</p>

<p><strong>Python Implementation</strong></p>

<p>Whenever we call the <code>servo.move()</code> method, the Python script <code>servo.py</code> handles the serial communication details using the <code>pyserial</code> module, and formats the arguments into the data packet outlined above.  The bare-bones version looks like this:</p>

<pre name="code" class="python:nocontrols">
#!/usr/bin/env python

import serial
usbport = '/dev/ttyUSB0'
ser = serial.Serial(usbport, 9600, timeout=1)

def move(servo, angle):
    if (0 <= angle <= 180):
        ser.write(chr(255))
        ser.write(chr(servo))
        ser.write(chr(angle))
    else:
        pass
</pre>

<p><strong>Arduino Implementation</strong></p>

<p>Arduino opens its own serial connection, waits for at least three bytes to fill the buffer, then starts reading:</p>

<pre name="code" class="arduino:nocontrols">
/** MultipleServos.pde (bare bones) **/

void setup() {
  // open serial connection
  Serial.begin(9600);
}

void loop() {
  // wait for serial input (min 3 bytes in buffer)
  if (Serial.available() > 2) {
    //read the first byte
    startbyte = Serial.read();
    // if it's really the startbyte (255)
    if (startbyte == 255) {
      // then get the next two bytes
      for (i=0;i<2;i++) {
        userInput[i] = Serial.read();
      }
      // first byte = servo to move?
      servo = userInput[0];
      // second byte = which position?
      servoPosition = userInput[1];
      // packet check
      if (servoPosition == 255) { servo = 255; }
</pre>

<p>If Arduino gets a complete packet with header, servo, and angle values, it calculates the correct <code>pulseWidth</code> for the commanded servo angle, and assigns that value to the appropriate servo.  If the value of <code>servo</code> is not between 1 and 4, the loop exits without assigning any new values.</p>

<pre name="code" class="arduino:nocontrols:firstline[25]">
      // compute pulseWidth from servoPosition
      pulseWidth = minPulse + (servoPosition * (pulseRange/180));
      // stop servo pulse at min and max
      if (pulseWidth > maxPulse) { pulseWidth = maxPulse; }
      if (pulseWidth < minPulse) { pulseWidth = minPulse; }
      // assign new pulsewidth to appropriate servo
      switch (servo) {
        case 1:
          servo1[1] = pulseWidth;
          break;
        case 2:
          servo2[1] = pulseWidth;
          break;
        case 3:
          servo3[1] = pulseWidth;
          break;
        case 4:
          servo4[1] = pulseWidth;
          break;
      }
    }
  }
</pre>

<p>Finally, once each loop, whether it receives any serial data or not, Arduino checks to see if the servos need a pulse.  To hold their current positions, RC servos expect a pulse at 50Hz (every 20ms), so Arduino keeps track of the <code>lastPulse</code>.  If the timer is up, all servos get a pulse.</p>

<pre name="code" class="arduino:nocontrols:firstline[46]">
  // pulse each servo
  if (millis() - lastPulse >= refreshTime) {
    pulse(servo1[0], servo1[1]);
    pulse(servo2[0], servo2[1]);
    pulse(servo3[0], servo3[1]);
    pulse(servo4[0], servo4[1]);
    // save the time of the last pulse
    lastPulse = millis();
  }
}

// create the pulse
void pulse(int pin, int puls) {
    digitalWrite(pin, HIGH); // start the pulse
    delayMicroseconds(puls); // pulse width
    digitalWrite(pin, LOW);  // stop the pulse
}
</pre>

<h4>Whew! We&#8217;re Done.</h4>

<p>Well, if you&#8217;ve made it this far, congratulations: you&#8217;re totally insane.  I hope the above dissertation helps at least one person better grasp these concepts, since it took me across many web pages and into several late nights to find the answers.  Good luck!</p>

<h4>References</h4>

<ol>
<li>Tom Igoe, <em><a href="http://www.oreilly.com/catalog/9780596510510/">Making Things Talk: Practical Methods for Connecting Physical Objects</a></em></li>
<li>Tom Igoe, &#8220;<a href="http://www.tigoe.net/pcomp/serial.shtml">Serial Communication</a>&#8220;</li>
<li>Tom Igoe, &#8220;<a href="http://www.tigoe.net/pcomp/serialdata.shtml">Interpreting Serial Data</a>&#8220;</li>
<li>Society of Robots, &#8220;<a href="http://www.societyofrobots.com/actuators_servos.shtml">Actuators and Servos</a>&#8220;</li>
<li>ITP Physical Computing, &#8220;<a href="http://itp.nyu.edu/physcomp/Labs/Servo">Servo Lab</a>&#8220;</li>
<li>ITP Physical Computing, &#8220;<a href="http://itp.nyu.edu/physcomp/Labs/Serial">Serial Lab</a>&#8220;</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://principialabs.com/arduino-python-4-axis-servo-control/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Why I Use Linux</title>
		<link>http://principialabs.com/why-i-use-linux/</link>
		<comments>http://principialabs.com/why-i-use-linux/#comments</comments>
		<pubDate>Wed, 19 Mar 2008 03:11:39 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
		
		<category><![CDATA[linux]]></category>

		<category><![CDATA[computers]]></category>

		<category><![CDATA[open source]]></category>

		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://principialabs.com/why-i-use-linux-a-love-story/</guid>
		<description><![CDATA[

My first computer was an Apple IIc.  I was thirteen years old and, at that age, it was one of the most beautiful things I had ever seen.  It had a gorgeous, green-on-black display screen, 128KB of RAM, no hard disk, and a Slim-line internal 5.25&#8243; floppy drive into which you loaded whatever [...]]]></description>
			<content:encoded><![CDATA[<p><a href='http://principialabs.com/wp-content/uploads/apple-iic.jpg' title='Apple IIc'><img style="float: right; padding-left: 7px;" src='http://principialabs.com/wp-content/uploads/apple-iic.thumbnail.jpg' alt='Apple IIc' /></a></p>

<p>My first computer was an <a href="http://en.wikipedia.org/wiki/Apple_IIc">Apple IIc</a>.  I was thirteen years old and, at that age, it was one of the most beautiful things I had ever seen.  It had a gorgeous, green-on-black display screen, 128KB of RAM, no hard disk, and a Slim-line internal 5.25&#8243; floppy drive into which you loaded whatever version of <a href="http://en.wikipedia.org/wiki/Zork">Zork</a> you were in the mood for, and fired it up. All software was written in Applesoft BASIC, and although there was no official term for it at the time, everything was <a href="http://en.wikipedia.org/wiki/Open_source">open source</a>.</p>

<p>A simple Ctrl-C (or some such keystroke) was all that was required to break the flow of whatever program you were running and take a peek under the hood.  I wrote my first computer program on the IIc.  There might have been limits to what that little machine could do, but there were no restrictions.  If you could imagine it, you could build it, and if you didn&#8217;t know quite <em>how</em> to build it, you just found someone else&#8217;s program that did something close, and figured out how <em>they</em> had done it.  The Apple IIc was more than a tool, it was a teacher.</p>

<p>In college I used PCs and Macs, none of which I owned, of course &#8212; it just wasn&#8217;t expected in those days &#8212; and I reluctantly deciphered the library&#8217;s Unix terminals for the sole purpose of emailing friends with <a href="http://en.wikipedia.org/wiki/Pine_(e-mail_client)">Pine</a>.  Until my junior year, by which time I was accustomed to using the university&#8217;s computer labs for my paper-writing and other needs, I kept that old Apple IIc around, with a dot-matrix printer, just in case.</p>

<p>It wasn&#8217;t until after graduation that I could finally afford (almost) to purchase my own computer.  After buying and returning a couple of defective laptop PCs from a big box electronics retailer, I finally decided to go back to Apple, and I sprung for a <a href="http://en.wikipedia.org/wiki/PowerBook_G3">Powerbook G3</a>.  It was beautiful, and it was definitely a Mac, but something was missing.</p>

<p><span id="more-62"></span></p>

<p>By this time, of course, Apple had come a long way in user interface design.  The G3 ran MacOS 8, so it wasn&#8217;t without flaws, but it was intuitive, easy to use, and gorgeous.  <a href="http://diveintomark.org/archives/2006/06/02/when-the-bough-breaks">Only it wasn&#8217;t mine</a>.  It was Apple&#8217;s.  As long as what I wanted to do was what Apple wanted me to do, things were fine.  But as soon as I started thinking out of the box &#8230; well, it just wasn&#8217;t right.  It wasn&#8217;t the IIc.</p>

<p>A few years later, after doing the obligatory post-college drift for awhile, I went to flight school.  By then the G3 was nearly obsolete, but there was no money for anything new, and anyway a computer wasn&#8217;t a requirement for my new pursuit.  But one night, while grilling burgers in the muggy Florida evening, a friend of mine offered to give me an old Dell desktop, complete with keyboard and VGA monitor.  &#8220;It doesn&#8217;t work,&#8221; he said.  &#8220;It&#8217;ll turn on, but nothing shows up on the screen.  Anyway, I just bought a new one, so if you want it, it&#8217;s yours.&#8221;</p>

<p>And there it was:  my first project box.  A discarded old beige tower that probably didn&#8217;t work anyway.  There was little I could do to make it any less useful than it already was, so I took it.  I felt no pressure, no fear.  It wasn&#8217;t an appliance, it was junk, and I could experiment with it all I wanted.  I gambled that a cheap video card was all it would need to be back in shape, and I was right.</p>

<p>But once I had ripped the insides apart, and learned all I could from it, the fun stopped.  So I got it to run Windows 95 again, so what?  There was no magic in running Microsoft Word.  The project box sat idle.</p>

<p>And then I discovered Linux.</p>

<p>It was Red Hat Linux 7, to be exact, in CD format, from the back of a loaned copy of a <em>For Dummies</em> book, written by none other than Jon &#8216;maddog&#8217; Hall himself.  I wiped Windows from the hard disk and installed Linux for the first time.</p>

<p>The old Dell box was lacking a bit in the memory department, and it ran the Red Hat GUI a little slow, so I decided to configure it to boot to the command line.  Suddenly there it was:  the text interface on a black screen &#8212; the characters were white, but they might as well have been green, and that blinking cursor that awaited my command &#8212; I was back in my parents&#8217; basement, on the IIc, thirteen years old.  The World was inside that box, and it was mine to explore.</p>

<p>A few years, a new Windows laptop, and several project boxes later, I tried <a href="http://www.ubuntu.com/">Ubuntu</a>, a new flavor of Linux that showed promise as a truly useful, user-friendly OS.  Again there was no pressure, no fear, just a learning curve &#8212; only as steep as I wanted it to be &#8212; and there was Linux, the teacher.  I was hooked.  My &#8220;project&#8221; box became my primary computer, and when its hardware became too outdated to warrant patching up, I built a high-end AMD64 box from the ground up, specifically to run Linux.</p>

<p>Now, that computer, running Kubuntu 7.10, is my primary electronic tool, and my laptop sits mostly idle.  It&#8217;s as slick a system as anything I could ever want, and the best part is, I <em>own</em> it.  I run it.  I control it.  And I understand it, because I built it.  I use Linux for all the same reasons everyone else does: stability, security, freedom, exclusivity, variety &#8212; but mostly I use Linux because it&#8217;s like my old Apple IIc, and because it made me love computers again.</p>
]]></content:encoded>
			<wfw:commentRss>http://principialabs.com/why-i-use-linux/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Hulu: TV and Movies on the Web</title>
		<link>http://principialabs.com/hulu-tv-and-movies-on-the-web/</link>
		<comments>http://principialabs.com/hulu-tv-and-movies-on-the-web/#comments</comments>
		<pubDate>Thu, 13 Mar 2008 03:32:37 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
		
		<category><![CDATA[random]]></category>

		<category><![CDATA[hulu]]></category>

		<category><![CDATA[ubuntu]]></category>

		<category><![CDATA[video]]></category>

		<category><![CDATA[web 2.0]]></category>

		<guid isPermaLink="false">http://principialabs.com/hulu-tv-and-movies-on-the-web/</guid>
		<description><![CDATA[
Hulu.com is a brand-new, free, ad-supported streaming video service which combines content from more than fifty providers including FOX, NBC, MGM, Sony Pictures Television, Warner Bros., Lionsgate, and more.   Although Hulu has been live since October, the site just emerged today from its private beta-testing phase and is now open to everyone&#8211;as long [...]]]></description>
			<content:encoded><![CDATA[<p><a href='http://hulu.com' title='Hulu.com'><img style="float:left;padding-right:7px;" src='http://principialabs.com/wp-content/uploads/hulutm_130.jpg' alt='Hulu Logo' /></a>
<a href="http://www.hulu.com/">Hulu.com</a> is a brand-new, free, ad-supported streaming video service which combines content from more than fifty providers including FOX, NBC, MGM, Sony Pictures Television, Warner Bros., Lionsgate, and more.   Although Hulu has been live since October, the site just emerged <em>today</em> from its private beta-testing phase and is now open to everyone&#8211;as long as you live in the United States. </p>

<p>Hulu lets you watch full-length feature films like <em>The Big Lebowski</em> or <em>The Usual Suspects</em>, or recent television episodes of <em>Family Guy</em> or <em>The Office</em>.  Plus there&#8217;s a fair number of canceled cult classics like <em>Firefly</em>.</p>

<div style="text-align:center;">
  <img style="border:1px solid #eee;" src='http://principialabs.com/wp-content/uploads/hulu_most_popular_tv-shows_page-sm.jpg' alt='Hulu Popular Shows' />
</div>

<p>Both shows and movies are interrupted with brief commercial breaks, but these can be &#8211;<em>ahem</em>&#8211; <a href="https://addons.mozilla.org/en-US/firefox/addon/1865">suppressed</a>, and they are definitely less intrusive than those on regular commercial television.  Content on Hulu is certainly limited, but they&#8217;re just getting started, and I must say, with respect to the movie selection, I&#8217;d be inclined to browse Hulu for decent flicks before I&#8217;ll suffer the crap from the Netflix &#8220;Watch Instantly&#8221; archive.</p>

<p><span id="more-52"></span></p>

<div style="text-align:center;">
  <img style="border:1px solid #eee;" src='http://principialabs.com/wp-content/uploads/hulu_video_player_page-sm.jpg' alt='Hulu Video Player' />
</div>

<p>Probably the biggest selling point for me is the fact that the Hulu Flash player is completely browser- and platform-independent, so I can watch fullscreen TV, movies, and eventually HD content on my fast, new Linux box with the big LCD.  I&#8217;m sick of having to go to my Windows laptop just to stream <em>LOST</em> on ABC.com or watch Netflix movies (which also require Internet Explorer&#8211;a <em>double</em> whammy!), because I get the &#8220;your OS/browser is not supported&#8221; message on Kubuntu.</p>

<p>Hulu also lets you embed full-length shows or movies right into a blog or website, and on top of that, the interface gives you the option of selecting a specific &#8220;clip&#8221; from a film or show to embed.  So, for example, if you wanted a specific scene from the film <em>Field of Dreams</em>, you could have it:</p>

<div style="float: none !important; text-align: center;"><object width="510" height="295"><param name="movie" value="http://www.hulu.com/embed/bu1sWIuZp1a-TC8uWN4B-w"></param><embed src="http://www.hulu.com/embed/bu1sWIuZp1a-TC8uWN4B-w" type="application/x-shockwave-flash"  width="510" height="295"></embed></object></div>

<p>Anyway, I&#8217;m sure there are a few bugs to tweak, and I&#8217;m always leery of anything with this kind of support from the &#8220;legacy&#8221; content providers, but so far it seems worth checking out, if only to see some old <em>Airwolf</em> reruns!</p>
]]></content:encoded>
			<wfw:commentRss>http://principialabs.com/hulu-tv-and-movies-on-the-web/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Biomimicry: Design Ideas from Nature</title>
		<link>http://principialabs.com/biomimicry-design-ideas-from-nature/</link>
		<comments>http://principialabs.com/biomimicry-design-ideas-from-nature/#comments</comments>
		<pubDate>Fri, 08 Feb 2008 16:11:25 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
		
		<category><![CDATA[technology]]></category>

		<category><![CDATA[biomimicry]]></category>

		<category><![CDATA[engineering]]></category>

		<category><![CDATA[nature]]></category>

		<category><![CDATA[ted]]></category>

		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://principialabs.com/biomimicry-design-ideas-from-nature/</guid>
		<description><![CDATA[


This excellent video from the TED Talks website deals with biomimicry, the concept of getting engineering inspiration from the natural world.

From the abstract:  With 3.8 billion years of research and development on its side, nature has already solved problems that human designers and engineers still struggle with.

In this inspiring talk, Janine Benyus provides fascinating [...]]]></description>
			<content:encoded><![CDATA[<div class="video"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="320" height="285" id="VE_Player" align="middle"><param name="movie" value="http://static.videoegg.com/ted/flash/loader.swf"><param NAME="FlashVars" VALUE="bgColor=FFFFFF&#038;file=http://static.videoegg.com/ted/movies/JANINEBENYUS_high.flv&#038;autoPlay=false&#038;fullscreenURL=http://static.videoegg.com/ted/flash/fullscreen.html&#038;forcePlay=false&#038;logo=&#038;allowFullscreen=true"><param name="quality" value="high"><param name="allowScriptAccess" value="always"><param name="bgcolor" value="#FFFFFF"><param name="scale" value="noscale"><param name="wmode" value="window"><embed src="http://static.videoegg.com/ted/flash/loader.swf" FlashVars="bgColor=FFFFFF&#038;file=http://static.videoegg.com/ted/movies/JANINEBENYUS_high.flv&#038;autoPlay=false&#038;fullscreenURL=http://static.videoegg.com/ted/flash/fullscreen.html&#038;forcePlay=false&#038;logo=&#038;allowFullscreen=true" quality="high" allowScriptAccess="always" bgcolor="#FFFFFF" scale="noscale" wmode="window" width="320" height="285" name="VE_Player" align="middle" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></object>
</div>

<p>This excellent video from the <a href="http://www.ted.com/">TED Talks</a> website deals with biomimicry, the concept of getting engineering inspiration from the natural world.</p>

<p>From the abstract:  <em>With 3.8 billion years of research and development on its side, nature has already solved problems that human designers and engineers still struggle with.</em></p>

<p><em>In this inspiring talk, <a href="http://www.ted.com/index.php/speakers/view/id/19">Janine Benyus</a> provides fascinating examples of biomimicry &#8212; the way humans mimic nature in the products we build and the systems we implement. And because the champion adapters in the natural world are, by definition, those that can survive without destroying the environment that sustains them, biomimicry can contribute to the long-term health of our planet.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://principialabs.com/biomimicry-design-ideas-from-nature/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Virgin Galactic&#8217;s SpaceShipTwo Video</title>
		<link>http://principialabs.com/virgin-galactics-spaceshiptwo-video/</link>
		<comments>http://principialabs.com/virgin-galactics-spaceshiptwo-video/#comments</comments>
		<pubDate>Fri, 25 Jan 2008 21:34:24 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
		
		<category><![CDATA[spaceflight]]></category>

		<category><![CDATA[newspace]]></category>

		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://principialabs.com/virgin-galactics-spaceshiptwo-video/</guid>
		<description><![CDATA[On January 23, 2008, Burt Rutan and Richard Branson unveiled the new designs of Virgin Galactic&#8217;s SpaceShipTwo and its carrier aircraft, White Knight 2.  This engaging animation gives you a sense of what a suborbital trip on SpaceShipTwo might be like.





]]></description>
			<content:encoded><![CDATA[<p>On January 23, 2008, Burt Rutan and Richard Branson unveiled the new designs of Virgin Galactic&#8217;s SpaceShipTwo and its carrier aircraft, White Knight 2.  This engaging animation gives you a sense of what a suborbital trip on SpaceShipTwo might be like.</p>

<p><span id="more-50"></span></p>

<div style="text-align: center; margin-bottom: 10px;"><embed src="http://services.brightcove.com/services/viewer/federated_f8/1119669386" bgcolor="#FFFFFF" flashVars="videoId=1389983156&#038;playerId=1119669386&#038;viewerSecureGatewayURL=https://services.brightcove.com/services/amfgateway&#038;servicesURL=http://services.brightcove.com/services&#038;cdnURL=http://admin.brightcove.com&#038;domain=embed&#038;autoStart=false&#038;" base="http://admin.brightcove.com" name="flashObj" width="500" height="400" seamlesstabbing="false" type="application/x-shockwave-flash" swLiveConnect="true" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></embed>
</div>
]]></content:encoded>
			<wfw:commentRss>http://principialabs.com/virgin-galactics-spaceshiptwo-video/feed/</wfw:commentRss>
		</item>
		<item>
		<title>First Flight in Your Homebuilt Aircraft</title>
		<link>http://principialabs.com/first-flight-in-your-homebuilt-aircraft/</link>
		<comments>http://principialabs.com/first-flight-in-your-homebuilt-aircraft/#comments</comments>
		<pubDate>Fri, 25 Jan 2008 15:56:16 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
		
		<category><![CDATA[aviation]]></category>

		<category><![CDATA[eaa]]></category>

		<category><![CDATA[flight test]]></category>

		<category><![CDATA[homebuilding]]></category>

		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://principialabs.com/first-flight-in-your-homebuilt-aircraft/</guid>
		<description><![CDATA[&#8220;A well thought out test plan is a necessity for any first flight.&#8221;  That is the admonition of former astronaut &#8220;Hoot&#8221; Gibson in this informative 24-minute video from the Experimental Aircraft Association.

The probability of an accident occurring in a homebuilt aircraft is high during its initial flight test phase.  This is especially true [...]]]></description>
			<content:encoded><![CDATA[<p>&#8220;A well thought out test plan is a necessity for any first flight.&#8221;  That is the admonition of former astronaut &#8220;Hoot&#8221; Gibson in this informative 24-minute video from the Experimental Aircraft Association.</p>

<p>The probability of an accident occurring in a homebuilt aircraft is high during its initial flight test phase.  This is especially true if the builder-pilot has limited experience in the type of aircraft being flown.  Often homebuilders put so much emphasis on completing the project that they forget to hone their flying skills during the construction period.</p>

<p><span id="more-42"></span></p>

<div style="text-align: center;"><embed src="http://services.brightcove.com/services/viewer/federated_f8/1119669386" bgcolor="#FFFFFF" flashVars="videoId=1381694259&#038;playerId=1119669386&#038;viewerSecureGatewayURL=https://services.brightcove.com/services/amfgateway&#038;servicesURL=http://services.brightcove.com/services&#038;cdnURL=http://admin.brightcove.com&#038;domain=embed&#038;autoStart=false&#038;" base="http://admin.brightcove.com" name="flashObj" width="380" height="300" seamlesstabbing="false" type="application/x-shockwave-flash" swLiveConnect="true" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></embed>
</div>

<p>FAA Advisory Circular <a href="/pdf/AC90-89A.pdf">AC90-89A</a> (PDF, 798K), the &#8220;Amateur-Built Aircraft and Flight Testing Handbook&#8221; is a 99-page document detailing the necessary preparation for and execution of a flight test program for your homebuilt aircraft.</p>

<p>The EAA provides assistance to builders and pilots embarking on this exciting and rewarding quest.  Learn more at <a href="http://eaa.org">EAA.org</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://principialabs.com/first-flight-in-your-homebuilt-aircraft/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.926 seconds -->
<!-- Cached page served by WP-Cache -->
<!-- Compression = gzip -->