<?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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>refractal make</title>
	<atom:link href="http://make.refractal.org/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://make.refractal.org</link>
	<description>hack the ether, or a playground for the electro-mechanical</description>
	<lastBuildDate>Mon, 13 Oct 2008 01:37:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Make a portfolio website with WordPress</title>
		<link>http://make.refractal.org/?p=15</link>
		<comments>http://make.refractal.org/?p=15#comments</comments>
		<pubDate>Mon, 13 Oct 2008 01:24:38 +0000</pubDate>
		<dc:creator>marc</dc:creator>
				<category><![CDATA[webdesign]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://make.refractal.org/?p=15</guid>
		<description><![CDATA[The other day I set myself to figuring out what the best way to make a portfolio website for my artwork. I hope that this guide can be of use to any artists or designers looking for an easy way to build out a portfolio. If you can get WordPress installed and have access to [...]]]></description>
			<content:encoded><![CDATA[<p><img class="aligncenter size-full wp-image-20" title="portfolioscreenshot" src="http://make.refractal.org/wp-content/uploads/2008/10/portfolioscreenshot.jpg" alt="" /></p>
<p>The other day I set myself to figuring out what the best way to make a portfolio website for my artwork. I hope that this guide can be of use to any artists or designers looking for an easy way to build out a portfolio. If you can get WordPress installed and have access to an FTP account then all you really need is a little love and patience and all will be well.</p>
<p>Thinking about how I would go about making such a site, it seemed ideal that it would use one of the preexisting content management systems like Drupal or WordPress. For me, the main requirements I had were: (1) a portfolio page with a bunch of thumbnails, (2) sub-pages where contact and other static information could published, and (3) easy content updating.</p>
<p>One good candidate I came up with was <a href="http://www.zenphoto.org" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.zenphoto.org');">Zenphoto</a>, a sample site of which you can find <a href="http://www.zenphoto.org/zenphoto/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.zenphoto.org');">here</a>. In some ways this would make a very good solution because the diversity of <a href="http://www.zenphoto.org/zp/theme/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.zenphoto.org');">gallery themes</a> give a certain latitude in how the images are presented. However, from what I could smell, Zenphoto is really lagging other CMS systems in terms of development and a range of themes\plugins. I therefore decided to move on.</p>
<p>The solution I finally settled on was a combination of WordPress and the Yet Another Photoblog Plugin. You can see <a href="www.marcdacosta.com">the site I made here</a>. It uses the <a href="http://blog.jasen.dk/monolit" onclick="javascript:pageTracker._trackPageview('/outbound/article/blog.jasen.dk');">Monolit</a> theme pretty much out of the box. For general reference I will outline the changes I made to it for anyone who wants to adapt it for a similar purpose. First thing is first: install WordPress, <a href="http://johannes.jarolim.com/blog/wordpress/yet-another-photoblog/" onclick="javascript:pageTracker._trackPageview('/outbound/article/johannes.jarolim.com');">Yet Another Photo Blog</a> and <a href="http://blog.jasen.dk/monolit" onclick="javascript:pageTracker._trackPageview('/outbound/article/blog.jasen.dk');">Monolit</a>. Dreamhost, my host, has a very nice one-click install that drops a WordPress installation and mysql database right on top of your domain making the setup of WordPress a breeze.</p>
<ul>
<li>Go to the YAPB settings and under Automatic Image Insertion, unselect &#8220;Activate automatic image rendering in general&#8221; otherwise two copies of each picture will appear on each page.</li>
<li>Create a few posts with images in them and assign them the same category. This will group them together on the Archive page that we will create next and then hack into a Portfolio page.</li>
<li>Create a page using the Archive template.</li>
<li>Also create however many additional pages you may want to have (About, Contact, et cetera)</li>
</ul>
<p>Now for a small dose of PHP editing:</p>
<ul>
<li>In the folder that you uploaded the monolit theme there will be a subfolder called config and in it a file called config.php; find it and open it. I think you will have to use an FTP client for this step as it will not appear in the Theme Editor portion of your WordPress UI. The first section should have a list of definitions that look something like: &#8220;define(&#8216;MONOLIT_SET_ABOUT_WP_TITLE&#8217;, &#8216;about&#8217;);&#8221;. In this example &#8216;about&#8217; is referring to a page title as it would appear in WordPress. Copy this line over a few times and change it to suit your needs [eg. define('MONOLIT_SET_CONTACT_WP_TITLE', 'contact');]</li>
<li>Change the &#8220;define(&#8216;MONOLIT_SET_COPYRIGHT)&#8221; string to alter the footer text of each page.</li>
<li>In the Menu Configuration section add a define line for each of the pages that you referenced in the first WordPress Page Titles section and set them to show (1). Also show the latest page (this is the index) and the archive page.</li>
<li>Take note of the other settings you can change in the config file for your reference and to tweak things later.</li>
<li>Open the functions.php file. You can do this within the WordPress theme editor. Find the menu function (&#8220;function monolit_get_menuitems&#8221;). As you can see here, these if statements are calling the config file we just edited and looking to see if the pages referenced there are turned on (1) or off (0). Duplicate the &#8220;if (MONOLIT_SET_SHOW_ABOUT == 1) :&#8221; section as many times as necessary and alter the copies to cover the new pages that you referenced in the config section.</li>
<li>Look for &#8220;latest_photo_link = buildLink($latest_photo_url, MSG_MENUITEM_LATEST);&#8221; Here if you change &#8220;MSG_MENUITEM_LATEST&#8221; to something like &#8220;Portfolio&#8221; it will alter the menu text accordingly.</li>
<li>After you made these changes go back and view the site. If you have not actually created the pages that you referenced in config.php and in functions.php make them now. The links on the top of the blog should now all work.</li>
<li>Now go to the archives link that you enabled. The theme is set up to show you an archive portal when you do that which lets you enter a variety of archives based on different criteria (date, author, category, etc). This is why it was useful to keep all the posts we made earlier in the same category. When you click on that category you will be taken to a page with thumbnails of the images in your post that will be sized and arranged according to the settings in config.php .  By taking note of the direct address to this category archive page we can rewrite this archive portal to take us directly there.</li>
<li>Open archives.php and replace it with this code:</li>
</ul>
<blockquote><p>&lt;?php<br />
$URL=&#8221;http://www.ARCHIVEPAGE&#8221;;<br />
header (&#8220;Location: $URL&#8221;);<br />
?&gt;</p></blockquote>
<ul>
<li>After doing this, clicking on the Archives link should just direct you to the category archive that has been selected. If you want this page to be your index, you can direct WordPress to automatically load it under Settings&#8211;&gt;Reading&#8211;&gt;Static front page</li>
<li>To remove dates from the posts, check out the <a href="http://www.dailyblogtips.com/date-exclusion-wordpress-plugin/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.dailyblogtips.com');">date exclusion WordPress plugin</a></li>
<li>To add a contact form, there does not seem to be too much of a better way to go than <a href="http://green-beast.com/blog/?page_id=136#fe" onclick="javascript:pageTracker._trackPageview('/outbound/article/green-beast.com');">this PHP Contact Form WordPress plugin</a></li>
<li>Of course you can edit the CSS to your heart&#8217;s content to alter the formatting. But this is a good quick and dirty to build a portfolio website.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://make.refractal.org/?feed=rss2&amp;p=15</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Infrared remote control for Nikon D50</title>
		<link>http://make.refractal.org/?p=3</link>
		<comments>http://make.refractal.org/?p=3#comments</comments>
		<pubDate>Sun, 28 Sep 2008 03:39:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[arduino]]></category>
		<category><![CDATA[camera]]></category>
		<category><![CDATA[infrared]]></category>

		<guid isPermaLink="false">http://make.refractal.org/?p=3</guid>
		<description><![CDATA[Today, much to my consternation, I realized that I had lost my shutter release remote control for my DSLR. As it happened, I also had an infrared LED lying around. So I decided that it shouldn&#8217;t be too hard to find the right flash sequence somewhere online and use an Arduino to make my own. [...]]]></description>
			<content:encoded><![CDATA[<p>Today, much to my consternation, I realized that I had lost my shutter release remote control for my DSLR. As it happened, I also had an infrared LED lying around. So I decided that it shouldn&#8217;t be too hard to find the right flash sequence somewhere online and use an Arduino to make my own.</p>
<p style="text-align: center;"><a href="http://make.refractal.org/wp-content/uploads/2008/09/simpleirarduino.jpg" ><img class="size-full wp-image-4 aligncenter" title="simpleirarduino" src="http://make.refractal.org/wp-content/uploads/2008/09/simpleirarduino.jpg" alt="" width="450" height="317" /></a></p>
<p>As you can see, the basic prototype of the circuit could not be simpler: just the LED and a 220ohm resistor to throttle back that 5V the arduino so lovingly sends forth.</p>
<p>The timing sequence that was needed to control the Nikon shutter release came from <a href="http://www.bigmike.it/ircontrol/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.bigmike.it');">Big Mike</a>. If you go over to his site, you will see a detailed tutorial on how to build this remote using a ATTiny2313 using the AVR programmer. The code you will need for the Arduino is as follows:</p>
<blockquote><p>int outPin = 8;                 // digital pin 8</p>
<p>void setup()<br />
{<br />
pinMode(outPin, OUTPUT);      // sets the digital pin as output<br />
}</p>
<p>void oscillationWrite(int pin, int time) {    // this function will cause the LED to flicker at approximately 38KHz<br />
for(int i = 0; i &lt;= time/26; i++) {<br />
digitalWrite(pin, HIGH);<br />
delayMicroseconds(13);<br />
digitalWrite(pin, LOW);<br />
delayMicroseconds(13);<br />
}<br />
}</p>
<p>void loop()<br />
{<br />
oscillationWrite(outPin, 2000);         // sets the pin on 2250us<br />
delayMicroseconds(27830);              // sets the pin off 27600us<br />
oscillationWrite(outPin, 390);           // sets the pin on 650us<br />
delayMicroseconds(1580);                // sets the pin off 1375us<br />
oscillationWrite(outPin, 410);           // sets the pin on 575us<br />
delayMicroseconds(3580);                // sets the pin off 3350us<br />
oscillationWrite(outPin, 400);           // sets the pin on 650us</p>
<p>delayMicroseconds(63200);              //wait 63ms</p>
<p>oscillationWrite(outPin, 2000);         // sets the pin on 2250us<br />
delayMicroseconds(27830);              // sets the pin off 27600us<br />
oscillationWrite(outPin, 390);           // sets the pin on 650us<br />
delayMicroseconds(1580);                // sets the pin off 1375us<br />
oscillationWrite(outPin, 410);           // sets the pin on 575us<br />
delayMicroseconds(3580);                // sets the pin off 3350us<br />
oscillationWrite(outPin, 400);           // sets the pin on 650us</p>
<p>delay(1000);                          // the sequence needs to loop twice and then cease</p></blockquote>
<blockquote><p>}</p></blockquote>
<p>The only thing worth pointing out here is that we needed to create the oscillationWrite function because the protocol for most IR device requires the light to oscillate at a frequency of roughly 20KHz. We achieve this by causing the LED to go high 13us then low for 13us whenever we are sending light to the device. The common wisdom is that manufactuers implemented this so that the sun could not trigger any remote control functions.</p>
<p>So this simple IR code should work with every camera supported by ML-L1 and ML-L3 Nikon remote controls such as D40, D40X, D50, D60, D70, D70s, D80, Coolpix 8400 8800.</p>
<p>Beyond just building another remote for myself, I am wondering what else can be done with this easy access to my camera&#8217;s shutter function. A few ideas might be</p>
<ul>
<li>Write a small web applet to trigger the camera.</li>
</ul>
<ul>
<li>Time lapse photography</li>
</ul>
<ul>
<li>Connect to biometric data to snap pictures of subject at moments of great stress or alarm</li>
</ul>
<ul>
<li>To make a device for capturing high speed events (eg place a microphone by a balloon and use the sound peak from that to trigger the shutter of the camera).</li>
</ul>
<ul>
<li>Set up a light continuity sensor in a public place and photograph people as they walk through it.</li>
</ul>
<p><strong>UPDATE:</strong> After some more testing with the code above using the microsecondDelay function I was only able to get somewhat sporadic success in getting the shutter to trigger. <a href="http://www.cibomahto.com/?p=249#comment-9640" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.cibomahto.com');">Matt at CiboMahto</a>, however, created a library for the Arduino platform that instructs the Atmega168 directly with assembly commands and seems to work like a charm for the shutter trigger. At this point the only technical problem I am still having is keeping the camera live after fifty or so frames are shot, one every thirty seconds, using the remote.</p>
<blockquote><p>[<a href="http://www.cibomahto.com/?p=249#comment-9640" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.cibomahto.com');">Matt at CiboMahto</a> writes:] The most straightforward approach to this would be to take apart an existing remote and fire its button with a microcontroller. However, that didn’t sound like much of a challenge, so instead the goal became to train the micro to output the signals itself. A quick search fished out a well-documented <a href="http://www.sbprojects.com/projects/nikon/index.htm" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.sbprojects.com');">solution</a> by one <a href="http://www.sbprojects.com/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.sbprojects.com');">San Bergmans</a>. The routine is written in assembly to generate an accurate signal. I chose the Arduino as my platform, and figured out that it is pretty straightforward to include assembly inside of a C++ file. So, I ported San’s code to the Atmega168 that my Arduino is based on, and it appears to work quite swimmingly. The routine is wrapped up in a library, so using it is as simple as adding the library to your project and calling the Snap() function. There are a couple of caveats to this code,though: it (currently) only works on pin 12, and will only support the default clock frequency (16MHz?). Code after the break.</p>
<p>To use these, place them in a folder named NikonRemote, which should be located in the hardware/libraries/ section of your Arduino installation. Then, restart (or just start) the Arduino program, add the library to the project, and create the object in your sketch:</p>
<div class="wp_syntax">
<div class="code">
<pre class="cpp cpp" style="font-family: monospace;">NikonRemote remote<span style="color: #008000;">(</span><span style="color: #0000dd;">12</span><span style="color: #008000;">)</span>;</pre>
</div>
</div>
<p>Whenever you want to trigger the camera, just do this:</p>
<div class="wp_syntax">
<div class="code">
<pre class="cpp cpp" style="font-family: monospace;">remote.<span style="color: #007788;">Snap</span><span style="color: #008000;">(</span><span style="color: #008000;">)</span>;</pre>
</div>
</div>
<p>Oh, and don’t forget to attach an IR LED to pin 12, with some sort of current-limiting resistor. Tip: You can test if the IR LED is in the correct orientation by powering it up and looking at it with a digital that has a live preview.</p>
<p>NikonRemote.h:</p>
<div class="wp_syntax">
<div class="code">
<pre class="cpp cpp" style="font-family: monospace;"><span style="color: #339900;">#ifndef NikonRemote_h</span>
<span style="color: #339900;">#define NikonRemote_h</span>

<span style="color: #339900;">#include "WConstants.h"</span>

<span style="color: #0000ff;">class</span> NikonRemote <span style="color: #008000;">{</span>
  <span style="color: #0000ff;">public</span><span style="color: #008080;">:</span>
    NikonRemote<span style="color: #008000;">(</span><span style="color: #0000ff;">unsigned</span> <span style="color: #0000ff;">int</span> port<span style="color: #008000;">)</span>;

    <span style="color: #0000ff;">void</span> Snap<span style="color: #008000;">(</span><span style="color: #008000;">)</span>;

  <span style="color: #0000ff;">private</span><span style="color: #008080;">:</span>
    <span style="color: #0000ff;">unsigned</span> <span style="color: #0000ff;">int</span> _port;
<span style="color: #008000;">}</span>;
<span style="color: #339900;">#endif</span></pre>
</div>
</div>
<p>NikonRemote.cpp:</p>
<pre class="cpp cpp" style="font-family: monospace;"><span style="color: #666666;">//</span>
<span style="color: #666666;">// NikonRemote</span>
<span style="color: #666666;">//</span>
<span style="color: #666666;">// This is an evil Arduino library that uses inline assembly to generate an IR</span>
<span style="color: #666666;">// signal capable of triggering a Nikon SLR camera.</span>
<span style="color: #666666;">//</span>
<span style="color: #666666;">// By Matt Mets, October, 2008.</span>
<span style="color: #666666;">//</span>
<span style="color: #666666;">// Adapted from San Bergman's 'ML-L1 / ML-L3 IR remote control replacement'</span>
<span style="color: #666666;">// http://www.sbprojects.com/projects/nikon/index.htm</span>
<span style="color: #666666;">//</span>
<span style="color: #666666;">// Note: At time of writing, it isn't clear what license it can be used under.</span>
<span style="color: #666666;">//       I will contact the author about this.</span>
<span style="color: #666666;">// Note: This is an incomplete implementation.  It requires the output LED to</span>
<span style="color: #666666;">//       be on pin 12.</span>

<span style="color: #339900;">#include "NikonRemote.h"</span>

NikonRemote<span style="color: #008080;">::</span><span style="color: #007788;">NikonRemote</span><span style="color: #008000;">(</span><span style="color: #0000ff;">unsigned</span> <span style="color: #0000ff;">int</span> port<span style="color: #008000;">)</span>
<span style="color: #008000;">{</span>
  pinMode<span style="color: #008000;">(</span>port, OUTPUT<span style="color: #008000;">)</span>;
  _port <span style="color: #000080;">=</span> port;
<span style="color: #008000;">}</span>

<span style="color: #0000ff;">void</span> NikonRemote<span style="color: #008080;">::</span><span style="color: #007788;">Snap</span><span style="color: #008000;">(</span><span style="color: #008000;">)</span>
<span style="color: #008000;">{</span>
<span style="color: #666666;">// Definitions:</span>
<span style="color: #666666;">// r16: port ON value</span>
<span style="color: #666666;">// r17: port OFF value</span>
<span style="color: #666666;">// r18: burst delay counter</span>
<span style="color: #666666;">// r19: burst counter</span>
<span style="color: #666666;">// r20: end delay counter</span>
<span style="color: #666666;">// r21: port mask</span>

<span style="color: #666666;">// 0x03: Port B input register</span>
<span style="color: #666666;">// 0x05: Port B output register</span>

  asm <span style="color: #0000ff;">volatile</span> <span style="color: #008000;">(</span>

<span style="color: #ff0000;">"<span style="font-weight: bold; color: #666666;">\n</span><span style="font-weight: bold; color: #666666;">\t</span> cli"</span>              <span style="color: #666666;">// Disable interrupts</span>

<span style="color: #ff0000;">"<span style="font-weight: bold; color: #666666;">\n</span><span style="font-weight: bold; color: #666666;">\t</span> push r16"</span>         <span style="color: #666666;">// Save context</span>
<span style="color: #ff0000;">"<span style="font-weight: bold; color: #666666;">\n</span><span style="font-weight: bold; color: #666666;">\t</span> push r17"</span>
<span style="color: #ff0000;">"<span style="font-weight: bold; color: #666666;">\n</span><span style="font-weight: bold; color: #666666;">\t</span> push r18"</span>
<span style="color: #ff0000;">"<span style="font-weight: bold; color: #666666;">\n</span><span style="font-weight: bold; color: #666666;">\t</span> push r19"</span>
<span style="color: #ff0000;">"<span style="font-weight: bold; color: #666666;">\n</span><span style="font-weight: bold; color: #666666;">\t</span> push r20"</span>
<span style="color: #ff0000;">"<span style="font-weight: bold; color: #666666;">\n</span><span style="font-weight: bold; color: #666666;">\t</span> push r21"</span>

<span style="color: #ff0000;">"<span style="font-weight: bold; color: #666666;">\n</span><span style="font-weight: bold; color: #666666;">\t</span> in   r16, 0x03"</span>   <span style="color: #666666;">// Calculate on and off port values</span>
<span style="color: #ff0000;">"<span style="font-weight: bold; color: #666666;">\n</span><span style="font-weight: bold; color: #666666;">\t</span> ori  r16, 0x10"</span>
<span style="color: #ff0000;">"<span style="font-weight: bold; color: #666666;">\n</span><span style="font-weight: bold; color: #666666;">\t</span> in   r17, 0x03"</span>

<span style="color: #ff0000;">"<span style="font-weight: bold; color: #666666;">\n</span><span style="font-weight: bold; color: #666666;">\t</span> rjmp COMMAND"</span>     <span style="color: #666666;">// Jump to the command routine</span>

<span style="color: #ff0000;">"<span style="font-weight: bold; color: #666666;">\n</span>NEXTPULSE:"</span>
<span style="color: #ff0000;">"<span style="font-weight: bold; color: #666666;">\n</span><span style="font-weight: bold; color: #666666;">\t</span> ldi r18, 68"</span>      <span style="color: #666666;">// Count to 9 for one low pulse</span>
<span style="color: #ff0000;">"<span style="font-weight: bold; color: #666666;">\n</span>SENDBURST:"</span>          <span style="color: #666666;">// Low period delay loop</span>
<span style="color: #ff0000;">"<span style="font-weight: bold; color: #666666;">\n</span><span style="font-weight: bold; color: #666666;">\t</span> dec r18"</span>
<span style="color: #ff0000;">"<span style="font-weight: bold; color: #666666;">\n</span><span style="font-weight: bold; color: #666666;">\t</span> brne SENDBURST"</span>
<span style="color: #ff0000;">"<span style="font-weight: bold; color: #666666;">\n</span><span style="font-weight: bold; color: #666666;">\t</span> nop"</span>
<span style="color: #ff0000;">"<span style="font-weight: bold; color: #666666;">\n</span><span style="font-weight: bold; color: #666666;">\t</span> out 0x05, r21"</span>    <span style="color: #666666;">// Set the output to mask</span>
<span style="color: #ff0000;">"<span style="font-weight: bold; color: #666666;">\n</span><span style="font-weight: bold; color: #666666;">\t</span> ldi r18, 68"</span>      <span style="color: #666666;">// Count to 9 for one high pulse</span>
<span style="color: #ff0000;">"<span style="font-weight: bold; color: #666666;">\n</span>BURSTLOOP:"</span>

<span style="color: #ff0000;">"<span style="font-weight: bold; color: #666666;">\n</span><span style="font-weight: bold; color: #666666;">\t</span> dec r18"</span>
<span style="color: #ff0000;">"<span style="font-weight: bold; color: #666666;">\n</span><span style="font-weight: bold; color: #666666;">\t</span> brne BURSTLOOP"</span>
<span style="color: #ff0000;">"<span style="font-weight: bold; color: #666666;">\n</span><span style="font-weight: bold; color: #666666;">\t</span> out 0x05, r17"</span>    <span style="color: #666666;">// Set the output low</span>
<span style="color: #ff0000;">"<span style="font-weight: bold; color: #666666;">\n</span><span style="font-weight: bold; color: #666666;">\t</span> dec r19"</span>          <span style="color: #666666;">// Determine if another burst should be performed.</span>
<span style="color: #ff0000;">"<span style="font-weight: bold; color: #666666;">\n</span><span style="font-weight: bold; color: #666666;">\t</span> brne NEXTPULSE"</span>
<span style="color: #ff0000;">"<span style="font-weight: bold; color: #666666;">\n</span><span style="font-weight: bold; color: #666666;">\t</span> ret"</span>

<span style="color: #ff0000;">"<span style="font-weight: bold; color: #666666;">\n</span>COMMAND:"</span>

<span style="color: #666666;">// 2000us on</span>
<span style="color: #ff0000;">"<span style="font-weight: bold; color: #666666;">\n</span><span style="font-weight: bold; color: #666666;">\t</span> ldi r18, 65"</span>      <span style="color: #666666;">// initial pulse = 65</span>
<span style="color: #ff0000;">"<span style="font-weight: bold; color: #666666;">\n</span><span style="font-weight: bold; color: #666666;">\t</span> ldi r19, 76"</span>      <span style="color: #666666;">// count = 76</span>
<span style="color: #ff0000;">"<span style="font-weight: bold; color: #666666;">\n</span><span style="font-weight: bold; color: #666666;">\t</span> mov r21, r16"</span>     <span style="color: #666666;">// Mask on</span>
<span style="color: #ff0000;">"<span style="font-weight: bold; color: #666666;">\n</span><span style="font-weight: bold; color: #666666;">\t</span> rcall SENDBURST"</span>

<span style="color: #666666;">// 28ms off</span>
<span style="color: #ff0000;">"<span style="font-weight: bold; color: #666666;">\n</span><span style="font-weight: bold; color: #666666;">\t</span> ldi r18, 65"</span>      <span style="color: #666666;">// initial pulse = 65</span>
<span style="color: #ff0000;">"<span style="font-weight: bold; color: #666666;">\n</span><span style="font-weight: bold; color: #666666;">\t</span> ldi r19, 250"</span>     <span style="color: #666666;">// count = 250</span>
<span style="color: #ff0000;">"<span style="font-weight: bold; color: #666666;">\n</span><span style="font-weight: bold; color: #666666;">\t</span> mov r21, r17"</span>     <span style="color: #666666;">// Mask off</span>
<span style="color: #ff0000;">"<span style="font-weight: bold; color: #666666;">\n</span><span style="font-weight: bold; color: #666666;">\t</span> rcall SENDBURST"</span>
<span style="color: #ff0000;">"<span style="font-weight: bold; color: #666666;">\n</span><span style="font-weight: bold; color: #666666;">\t</span> ldi r18, 65"</span>      <span style="color: #666666;">// initial pulse = 65</span>
<span style="color: #ff0000;">"<span style="font-weight: bold; color: #666666;">\n</span><span style="font-weight: bold; color: #666666;">\t</span> ldi r19, 250"</span>     <span style="color: #666666;">// count = 250</span>
<span style="color: #ff0000;">"<span style="font-weight: bold; color: #666666;">\n</span><span style="font-weight: bold; color: #666666;">\t</span> mov r21, r17"</span>     <span style="color: #666666;">// Mask off</span>
<span style="color: #ff0000;">"<span style="font-weight: bold; color: #666666;">\n</span><span style="font-weight: bold; color: #666666;">\t</span> rcall SENDBURST"</span>
<span style="color: #ff0000;">"<span style="font-weight: bold; color: #666666;">\n</span><span style="font-weight: bold; color: #666666;">\t</span> ldi r18, 65"</span>      <span style="color: #666666;">// initial pulse = 65</span>
<span style="color: #ff0000;">"<span style="font-weight: bold; color: #666666;">\n</span><span style="font-weight: bold; color: #666666;">\t</span> ldi r19, 250"</span>     <span style="color: #666666;">// count = 250</span>
<span style="color: #ff0000;">"<span style="font-weight: bold; color: #666666;">\n</span><span style="font-weight: bold; color: #666666;">\t</span> mov r21, r17"</span>     <span style="color: #666666;">// Mask off</span>
<span style="color: #ff0000;">"<span style="font-weight: bold; color: #666666;">\n</span><span style="font-weight: bold; color: #666666;">\t</span> rcall SENDBURST"</span>
<span style="color: #ff0000;">"<span style="font-weight: bold; color: #666666;">\n</span><span style="font-weight: bold; color: #666666;">\t</span> ldi r18, 65"</span>      <span style="color: #666666;">// initial pulse = 65</span>
<span style="color: #ff0000;">"<span style="font-weight: bold; color: #666666;">\n</span><span style="font-weight: bold; color: #666666;">\t</span> ldi r19, 250"</span>     <span style="color: #666666;">// count = 250</span>
<span style="color: #ff0000;">"<span style="font-weight: bold; color: #666666;">\n</span><span style="font-weight: bold; color: #666666;">\t</span> mov r21, r17"</span>     <span style="color: #666666;">// Mask off</span>
<span style="color: #ff0000;">"<span style="font-weight: bold; color: #666666;">\n</span><span style="font-weight: bold; color: #666666;">\t</span> rcall SENDBURST"</span>
<span style="color: #ff0000;">"<span style="font-weight: bold; color: #666666;">\n</span><span style="font-weight: bold; color: #666666;">\t</span> ldi r18, 65"</span>      <span style="color: #666666;">// initial pulse = 65</span>
<span style="color: #ff0000;">"<span style="font-weight: bold; color: #666666;">\n</span><span style="font-weight: bold; color: #666666;">\t</span> ldi r19, 64"</span>      <span style="color: #666666;">// count = 64</span>
<span style="color: #ff0000;">"<span style="font-weight: bold; color: #666666;">\n</span><span style="font-weight: bold; color: #666666;">\t</span> mov r21, r17"</span>     <span style="color: #666666;">// Mask off</span>
<span style="color: #ff0000;">"<span style="font-weight: bold; color: #666666;">\n</span><span style="font-weight: bold; color: #666666;">\t</span> rcall SENDBURST"</span>

<span style="color: #666666;">// 400us on</span>
<span style="color: #ff0000;">"<span style="font-weight: bold; color: #666666;">\n</span><span style="font-weight: bold; color: #666666;">\t</span> ldi r18, 65"</span>      <span style="color: #666666;">// initial pulse = 65</span>
<span style="color: #ff0000;">"<span style="font-weight: bold; color: #666666;">\n</span><span style="font-weight: bold; color: #666666;">\t</span> ldi r19, 15"</span>      <span style="color: #666666;">// count = 15</span>
<span style="color: #ff0000;">"<span style="font-weight: bold; color: #666666;">\n</span><span style="font-weight: bold; color: #666666;">\t</span> mov r21, r16"</span>     <span style="color: #666666;">// Mask on</span>
<span style="color: #ff0000;">"<span style="font-weight: bold; color: #666666;">\n</span><span style="font-weight: bold; color: #666666;">\t</span> rcall SENDBURST"</span>

<span style="color: #666666;">// 1580us off</span>
<span style="color: #ff0000;">"<span style="font-weight: bold; color: #666666;">\n</span><span style="font-weight: bold; color: #666666;">\t</span> ldi r18, 65"</span>      <span style="color: #666666;">// initial pulse = 65</span>
<span style="color: #ff0000;">"<span style="font-weight: bold; color: #666666;">\n</span><span style="font-weight: bold; color: #666666;">\t</span> ldi r19, 60"</span>      <span style="color: #666666;">// count = 60</span>
<span style="color: #ff0000;">"<span style="font-weight: bold; color: #666666;">\n</span><span style="font-weight: bold; color: #666666;">\t</span> mov r21, r17"</span>     <span style="color: #666666;">// Mask off</span>
<span style="color: #ff0000;">"<span style="font-weight: bold; color: #666666;">\n</span><span style="font-weight: bold; color: #666666;">\t</span> rcall SENDBURST"</span>

<span style="color: #666666;">// 400us on</span>
<span style="color: #ff0000;">"<span style="font-weight: bold; color: #666666;">\n</span><span style="font-weight: bold; color: #666666;">\t</span> ldi r18, 65"</span>      <span style="color: #666666;">// initial pulse = 65</span>
<span style="color: #ff0000;">"<span style="font-weight: bold; color: #666666;">\n</span><span style="font-weight: bold; color: #666666;">\t</span> ldi r19, 15"</span>      <span style="color: #666666;">// count = 15</span>
<span style="color: #ff0000;">"<span style="font-weight: bold; color: #666666;">\n</span><span style="font-weight: bold; color: #666666;">\t</span> mov r21, r16"</span>     <span style="color: #666666;">// Mask on</span>
<span style="color: #ff0000;">"<span style="font-weight: bold; color: #666666;">\n</span><span style="font-weight: bold; color: #666666;">\t</span> rcall SENDBURST"</span>

<span style="color: #666666;">// 3580us off</span>
<span style="color: #ff0000;">"<span style="font-weight: bold; color: #666666;">\n</span><span style="font-weight: bold; color: #666666;">\t</span> ldi r18, 65"</span>      <span style="color: #666666;">// initial pulse = 65</span>
<span style="color: #ff0000;">"<span style="font-weight: bold; color: #666666;">\n</span><span style="font-weight: bold; color: #666666;">\t</span> ldi r19, 136"</span>     <span style="color: #666666;">// count = 136</span>
<span style="color: #ff0000;">"<span style="font-weight: bold; color: #666666;">\n</span><span style="font-weight: bold; color: #666666;">\t</span> mov r21, r17"</span>     <span style="color: #666666;">// Mask off</span>
<span style="color: #ff0000;">"<span style="font-weight: bold; color: #666666;">\n</span><span style="font-weight: bold; color: #666666;">\t</span> rcall SENDBURST"</span>

<span style="color: #666666;">// 400us on</span>
<span style="color: #ff0000;">"<span style="font-weight: bold; color: #666666;">\n</span><span style="font-weight: bold; color: #666666;">\t</span> ldi r18, 65"</span>      <span style="color: #666666;">// initial pulse = 65</span>
<span style="color: #ff0000;">"<span style="font-weight: bold; color: #666666;">\n</span><span style="font-weight: bold; color: #666666;">\t</span> ldi r19, 15"</span>      <span style="color: #666666;">// count = 15</span>
<span style="color: #ff0000;">"<span style="font-weight: bold; color: #666666;">\n</span><span style="font-weight: bold; color: #666666;">\t</span> mov r21, r16"</span>     <span style="color: #666666;">// Mask on</span>
<span style="color: #ff0000;">"<span style="font-weight: bold; color: #666666;">\n</span><span style="font-weight: bold; color: #666666;">\t</span> rcall SENDBURST"</span>

<span style="color: #ff0000;">"<span style="font-weight: bold; color: #666666;">\n</span><span style="font-weight: bold; color: #666666;">\t</span> pop  r21"</span>         <span style="color: #666666;">// Restore Context</span>
<span style="color: #ff0000;">"<span style="font-weight: bold; color: #666666;">\n</span><span style="font-weight: bold; color: #666666;">\t</span> pop  r20"</span>
<span style="color: #ff0000;">"<span style="font-weight: bold; color: #666666;">\n</span><span style="font-weight: bold; color: #666666;">\t</span> pop  r19"</span>
<span style="color: #ff0000;">"<span style="font-weight: bold; color: #666666;">\n</span><span style="font-weight: bold; color: #666666;">\t</span> pop  r18"</span>
<span style="color: #ff0000;">"<span style="font-weight: bold; color: #666666;">\n</span><span style="font-weight: bold; color: #666666;">\t</span> pop  r17"</span>
<span style="color: #ff0000;">"<span style="font-weight: bold; color: #666666;">\n</span><span style="font-weight: bold; color: #666666;">\t</span> pop  r16"</span>

<span style="color: #ff0000;">"<span style="font-weight: bold; color: #666666;">\n</span><span style="font-weight: bold; color: #666666;">\t</span> sei"</span>              <span style="color: #666666;">// Enable interrupts</span>
<span style="color: #ff0000;">"<span style="font-weight: bold; color: #666666;">\n</span><span style="font-weight: bold; color: #666666;">\t</span>"</span>
  <span style="color: #008000;">)</span>;
<span style="color: #008000;">}

</span><a href="http://www.cibomahto.com/?p=249#comment-9640" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.cibomahto.com');">Link</a></pre>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://make.refractal.org/?feed=rss2&amp;p=3</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
