<?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>stuff del likes &#187; arduino</title>
	<atom:link href="http://del.rudforce.com/tag/arduino/feed/" rel="self" type="application/rss+xml" />
	<link>http://del.rudforce.com</link>
	<description></description>
	<lastBuildDate>Sun, 25 Jul 2010 04:02:03 +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>812-R3</title>
		<link>http://del.rudforce.com/robots/812-r3/</link>
		<comments>http://del.rudforce.com/robots/812-r3/#comments</comments>
		<pubDate>Mon, 29 Jun 2009 00:40:32 +0000</pubDate>
		<dc:creator>Del</dc:creator>
				<category><![CDATA[Default]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[avr]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Robotics]]></category>
		<category><![CDATA[robots]]></category>
		<category><![CDATA[toys]]></category>

		<guid isPermaLink="false">http://del.rudforce.com/?page_id=451</guid>
		<description><![CDATA[Here&#8217;s the latest robot in the stables. Another one made from junk and parts I already had. See more at LMR.]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s the latest robot in the stables. Another one made from junk and parts I already had. See more at <a href="http://letsmakerobots.com/node/8441/"><acronym title="Lets Make Robots -- letsmakerobots.com">LMR</acronym></a>.</p>
<p><img class="alignnone size-full wp-image-452" title="IMG_3971" src="http://del.rudforce.com/wp-content/uploads/2009/06/IMG_3971.JPG" alt="IMG_3971" width="640" height="426" /></p>]]></content:encoded>
			<wfw:commentRss>http://del.rudforce.com/robots/812-r3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Another great idea that I didn&#8217;t have</title>
		<link>http://del.rudforce.com/2009/06/another-great-idea-that-i-didnt-have/</link>
		<comments>http://del.rudforce.com/2009/06/another-great-idea-that-i-didnt-have/#comments</comments>
		<pubDate>Wed, 17 Jun 2009 03:47:16 +0000</pubDate>
		<dc:creator>Del</dc:creator>
				<category><![CDATA[Default]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[Electronics]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://del.rudforce.com/?p=449</guid>
		<description><![CDATA[The Arduino Experimentation Kit (from oomlout) is a pretty damn slick thing. Usually I&#8217;m one of the shit talkers about Oomlout&#8217;s stuff (they think a lot of their laser cut plastic). This thing isn&#8217;t quite as pricey as I&#8217;d expect from them though, and the idea behind it is just cool. What got me more [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://www.adafruit.com/index.php?main_page=product_info&amp;cPath=17&amp;products_id=170">Arduino Experimentation Kit</a> (from <a href="http://www.oomlout.com/ards.html">oomlout</a>) is a pretty damn slick thing. Usually I&#8217;m one of the shit talkers about Oomlout&#8217;s stuff (they think a lot of their laser cut plastic). This thing isn&#8217;t quite as pricey as I&#8217;d expect from them though, and the idea behind it is just cool.</p>
<p>What got me more than anything else was the printed breadboard overlays. A very simple way to show just where to plug things in. Especially for a seven year old, which I just happen to have one of.</p>
<p>Damn I wish I&#8217;d thought of that&#8230;</p>]]></content:encoded>
			<wfw:commentRss>http://del.rudforce.com/2009/06/another-great-idea-that-i-didnt-have/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>8087-S1 Noisemaker</title>
		<link>http://del.rudforce.com/projects/8087-s1/</link>
		<comments>http://del.rudforce.com/projects/8087-s1/#comments</comments>
		<pubDate>Wed, 10 Jun 2009 02:44:00 +0000</pubDate>
		<dc:creator>Del</dc:creator>
				<category><![CDATA[Default]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[computers]]></category>
		<category><![CDATA[Electronics]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[Robotics]]></category>
		<category><![CDATA[robots]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://del.rudforce.com/?page_id=423</guid>
		<description><![CDATA[aka Rudolph&#8217;s Noisemaker Tool for Arduino I wanted my current robot project to make cool bleeps bloops and other stupid noises. Instead of just doing it I spent three days writing software to make an easy job &#8220;easier&#8221;. Well, okay, I spent two days doing it wrong, then switched to Python and tried again. This [...]]]></description>
			<content:encoded><![CDATA[<p>aka Rudolph&#8217;s Noisemaker Tool for Arduino</p>
<p>I wanted my current robot project to make cool bleeps bloops and other stupid noises. Instead of just doing it I spent three days writing software to make an easy job &#8220;easier&#8221;. Well, okay, I spent two days doing it wrong, then switched to Python and tried again. This package is the end result. It consists of an Arduino sketch that makes noise from numbers, and a <acronym title="Graphical User Interface">GUI</acronym> Python frontend to make it &#8220;clickier&#8221; (oooh).</p>
<p>I made this on a Linux system using <a href="http://www.python.org/">Python</a> 2.5.2. You&#8217;ll also need <a href="http://pyserial.wiki.sourceforge.net/pySerial">pySerial</a> installed. Oh, and an <a href="http://arduino.cc/">Arduino</a> ;) I have no idea if it will work on other operating systems, or with other versions of Python. <acronym title="Your mileage may vary">YMMV</acronym>. If you try it on another <acronym title="Operating System">OS</acronym> and it works, please let me know so I can update this file. If you had to change anything to make it work, and feel like sharing your changes, feel free to post your tweaks back so I can release an updated version (thanks in advance). You can leave comments here or at <a href="http://letsmakerobots.com/node/8087"><acronym title="Lets Make Robots -- letsmakerobots.com">LMR</acronym></a>.</p>
<p>I was having a hard time thinking up a name for it, and didn&#8217;t really want to call it &#8220;Noisemaker Tool&#8221;, or anything with the Arduino name actually in it. Then it hit me. Taking a styling cue from <a title="View user profile." href="http://letsmakerobots.com/user/1069">rik</a> I decided to name it after it&#8217;s node here. Henceforth it shall be called &#8220;8087-S1&#8243;, the S1 designating it as the first Software I&#8217;ve put here.</p>
<p><strong>Download</strong></p>
<p>Currently the package can be downloaded from rudforce.net in either <a href="http://rudforce.net/8087-S1/8087-S1_0.tar.gz">.tar.gz</a> or <a href="http://rudforce.net/8087-S1/8087-S1_0.zip">.zip</a> format. If anyone actually uses it, or if I get tired enough of a missing feature, I may actually get a real <acronym title="Subversion">SVN</acronym> repository set up. Maybe.</p>
<p><strong>Obligatory Screenshot</strong></p>
<p><strong><img class="alignnone size-full wp-image-430" title="screenshot" src="http://del.rudforce.com/wp-content/uploads/2009/06/screenshot.png" alt="screenshot" width="306" height="433" /><br />
</strong></p>]]></content:encoded>
			<wfw:commentRss>http://del.rudforce.com/projects/8087-s1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>*drool* &#8211; Arduino MEGA</title>
		<link>http://del.rudforce.com/2009/03/drool-arduino-mega/</link>
		<comments>http://del.rudforce.com/2009/03/drool-arduino-mega/#comments</comments>
		<pubDate>Tue, 17 Mar 2009 06:07:56 +0000</pubDate>
		<dc:creator>Del</dc:creator>
				<category><![CDATA[Default]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[Electronics]]></category>

		<guid isPermaLink="false">http://del.rudforce.com/?p=387</guid>
		<description><![CDATA[Arduino MEGA &#8211; Hack a Day.]]></description>
			<content:encoded><![CDATA[<p><a href="http://hackaday.com/2009/03/16/arduino-mega/"></p>
<p style="text-align: center;"><a href="http://hackaday.com/2009/03/16/arduino-mega/"><img src='http://del.rudforce.com/wp-content/uploads/2009/03/arduino_mega.jpg' alt='' /></a></p>
<p>Arduino MEGA &#8211; Hack a Day</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://del.rudforce.com/2009/03/drool-arduino-mega/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lieutenant Dan</title>
		<link>http://del.rudforce.com/robots/ltdan/</link>
		<comments>http://del.rudforce.com/robots/ltdan/#comments</comments>
		<pubDate>Sun, 08 Mar 2009 04:52:37 +0000</pubDate>
		<dc:creator>Del</dc:creator>
				<category><![CDATA[Default]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[avr]]></category>
		<category><![CDATA[Electronics]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[pseuduino]]></category>
		<category><![CDATA[Robotics]]></category>
		<category><![CDATA[robots]]></category>
		<category><![CDATA[toys]]></category>

		<guid isPermaLink="false">http://del.rudforce.com/?page_id=362</guid>
		<description><![CDATA[Here is Lt. Dan, my entry for the Junkbot 3 contest at the Trossen Robotics community. The rules are basically to use what ya got, and this time it&#8217;s with a humanoid twist. Lt. Dan should qualify as humanoid, as long as DB2 (the contest &#8220;sponsor&#8221;) accepts humanoids from the waist up. Lt. Dan is [...]]]></description>
			<content:encoded><![CDATA[<p>Here is Lt. Dan, my entry for the <a href="http://forums.trossenrobotics.com/showthread.php?t=2804">Junkbot 3</a> contest at the <a href="http://forums.trossenrobotics.com/">Trossen Robotics community</a>.</p>
<p>The rules are basically to use what ya got, and this time it&#8217;s with a humanoid twist. Lt. Dan should qualify as humanoid, as long as DB2 (the contest &#8220;sponsor&#8221;) accepts humanoids from the waist up.  Lt. Dan is mostly made of my old (~25 years) Erector set (or Mecanno for y&#8217;all cross-the-pond-ers) and pile of servos (seven to be precise). The brain is my pseuduino project.  The name comes from the fact that, well, he ain&#8217;t got no legs.  <div class="flickrTag_error"><p>Flickr Tag Error: Call to resolve user 'downinit' to an NSID failed.</p><p>Error state follows:</p><ul><li>stat: fail</li><li>code: 1</li><li>message: User not found</li></ul></div></p>
<p>More photos are <a href="http://picasaweb.google.com/rudforce/LieutenantDan">available here</a>.</p>
<p><span class="youtube">
<object width="425" height="373">
<param name="movie" value="http://www.youtube.com/v/w9Y9XLSH8QU&amp;color1=3a3a3a&amp;color2=999999&amp;border=1&amp;fs=1&amp;hl=en&amp;autoplay=0&amp;showinfo=0&amp;showsearch=0?rel=1" />
<param name="allowFullScreen" value="true" />
<embed wmode="transparent" src="http://www.youtube.com/v/w9Y9XLSH8QU&amp;color1=3a3a3a&amp;color2=999999&amp;border=1&amp;fs=1&amp;hl=en&amp;autoplay=0&amp;showinfo=0&amp;showsearch=0?rel=1" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="373"></embed>
<param name="wmode" value="transparent" />
</object>
</span><p><a href="http://www.youtube.com/watch?v=w9Y9XLSH8QU">www.youtube.com/watch?v=w9Y9XLSH8QU</a></p></p>]]></content:encoded>
			<wfw:commentRss>http://del.rudforce.com/robots/ltdan/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I really underestimated the creepiness&#8230;</title>
		<link>http://del.rudforce.com/2009/03/i-really-underestimated-the-creepiness/</link>
		<comments>http://del.rudforce.com/2009/03/i-really-underestimated-the-creepiness/#comments</comments>
		<pubDate>Fri, 06 Mar 2009 07:38:58 +0000</pubDate>
		<dc:creator>Del</dc:creator>
				<category><![CDATA[Default]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[argus]]></category>
		<category><![CDATA[avr]]></category>
		<category><![CDATA[Electronics]]></category>
		<category><![CDATA[flickr]]></category>
		<category><![CDATA[pictures]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[pseuduino]]></category>
		<category><![CDATA[Robotics]]></category>
		<category><![CDATA[robots]]></category>
		<category><![CDATA[test]]></category>
		<category><![CDATA[toys]]></category>

		<guid isPermaLink="false">http://del.rudforce.com/?p=360</guid>
		<description><![CDATA[So I&#8217;ve got &#8220;Dan&#8221; mostly built, just a few things remaining. Time to start working on the code. As the title says, though, I really underestimated just how creepy this thing would look with this styrofoam doll head. It&#8217;s a little better since this photo due to the addition of a sharpie smile, and a [...]]]></description>
			<content:encoded><![CDATA[<p>So I&#8217;ve got &#8220;Dan&#8221; mostly built, just a few things remaining. Time to start working on the code.</p>
<p>As the title says, though, I really underestimated just how creepy this thing would look with this styrofoam doll head. It&#8217;s a little better since this photo due to the addition of a sharpie smile, and a Darth Vader helmet.</p>
<p><a href="http://www.flickr.com/photos/downinit/3331162783/"><img src="http://farm4.static.flickr.com/3391/3331162783_34487d4dda.jpg" alt="" /></a></p>
<p>I&#8217;m gonna have to do something about that&#8230;</p>
<p>Oh, and I&#8217;ll have much nicer photos than that for the final writeup. Borrowed J&#8217;s little purse camera for this shot (Argus Bean), and it really really doesn&#8217;t like the lighting in my closet.</p>]]></content:encoded>
			<wfw:commentRss>http://del.rudforce.com/2009/03/i-really-underestimated-the-creepiness/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pseuduino</title>
		<link>http://del.rudforce.com/2009/03/pseuduino/</link>
		<comments>http://del.rudforce.com/2009/03/pseuduino/#comments</comments>
		<pubDate>Wed, 04 Mar 2009 06:03:39 +0000</pubDate>
		<dc:creator>Del</dc:creator>
				<category><![CDATA[Default]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[avr]]></category>
		<category><![CDATA[Electronics]]></category>
		<category><![CDATA[flickr]]></category>
		<category><![CDATA[pictures]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[pseuduino]]></category>
		<category><![CDATA[Robotics]]></category>
		<category><![CDATA[test]]></category>
		<category><![CDATA[toys]]></category>

		<guid isPermaLink="false">http://del.rudforce.com/?p=354</guid>
		<description><![CDATA[Here&#8217;s a few photos of my Pseuduino. I finally gave up waiting for stupid Futurlec to get my parts here and added servo headers to this board instead. Eventually I&#8217;ll put a more detailed writeup on a proper page. The main point of this board is to be the brain for my current robot project, [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a few photos of my Pseuduino. I finally gave up waiting for stupid Futurlec to get my parts here and added servo headers to this board instead. Eventually I&#8217;ll put a more detailed writeup on a proper page.<br />
<div class="flickrTag_error"><p>Flickr Tag Error: Call to resolve user 'downinit' to an NSID failed.</p><p>Error state follows:</p><ul><li>stat: fail</li><li>code: 1</li><li>message: User not found</li></ul></div><br />
The main point of this board is to be the brain for my current robot project, &#8220;Dan&#8221;. More about Dan soon.</p>]]></content:encoded>
			<wfw:commentRss>http://del.rudforce.com/2009/03/pseuduino/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Program Arduino with usbtinyisp</title>
		<link>http://del.rudforce.com/2009/02/program-arduino-with-usbtinyisp/</link>
		<comments>http://del.rudforce.com/2009/02/program-arduino-with-usbtinyisp/#comments</comments>
		<pubDate>Tue, 24 Feb 2009 21:51:38 +0000</pubDate>
		<dc:creator>Del</dc:creator>
				<category><![CDATA[Default]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[Electronics]]></category>
		<category><![CDATA[notes]]></category>
		<category><![CDATA[pseuduino]]></category>

		<guid isPermaLink="false">http://del.rudforce.com/?p=343</guid>
		<description><![CDATA[Note to self; On Farley, ~/.arduino/preferences.txt has been changed to &#8220;upload.using=usbtinyisp&#8221;. To go back to normal it&#8217;s &#8220;upload.using=bootloader&#8221;. Arduino &#8211; Programmer, usbtinyisp]]></description>
			<content:encoded><![CDATA[<p>Note to self; On Farley, ~/.arduino/preferences.txt has been changed to &#8220;upload.using=usbtinyisp&#8221;. To go back to normal it&#8217;s &#8220;upload.using=bootloader&#8221;.</p>
<p><a href="http://www.arduino.cc/en/Hacking/Programmer">Arduino &#8211; Programmer</a>, <a href="http://www.adafruit.com/index.php?main_page=product_info&amp;cPath=16&amp;products_id=46">usbtinyisp</a></p>]]></content:encoded>
			<wfw:commentRss>http://del.rudforce.com/2009/02/program-arduino-with-usbtinyisp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>walker 0</title>
		<link>http://del.rudforce.com/robots/walker-0/</link>
		<comments>http://del.rudforce.com/robots/walker-0/#comments</comments>
		<pubDate>Mon, 23 Feb 2009 04:42:48 +0000</pubDate>
		<dc:creator>Del</dc:creator>
				<category><![CDATA[Default]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[Electronics]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[pseuduino]]></category>
		<category><![CDATA[Robotics]]></category>
		<category><![CDATA[robots]]></category>
		<category><![CDATA[toys]]></category>

		<guid isPermaLink="false">http://del.rudforce.com/?page_id=329</guid>
		<description><![CDATA[My first ever walking robot. It&#8217;s pretty much my first ever robot period, not counting the BEAM bots. This is just a couple servos, a girder from my old Erector set, and an AVR for a brain. Construction time was about 1.5 hours, and another hour or so dingling with figuring out how to program [...]]]></description>
			<content:encoded><![CDATA[<p>My first ever walking robot. It&#8217;s pretty much my first ever robot period, not counting the BEAM bots. This is just a couple servos, a girder from my old Erector set, and an AVR for a brain. Construction time was about 1.5 hours, and another hour or so dingling with figuring out how to program it to walk. Code below is for Arduino.</p>
<p>After I polish up the forward walking I&#8217;ll attempt reverse. If I can get that working I&#8217;ll aim for steering too. After that I may or may not try adding a PING))) or IR sensor for avoiding objects.</p>
<p><strong>Update Feb 24:</strong> Added reverse, and it mostly works. Backing up is pretty slow and the feet are more likely to get hung up in the carpet when going backwards, but it still does it. I also tweaked the bends of the front legs and totally fouled things up&#8230; It&#8217;s about 90% back to its original walking ability. I guess my lesson is to fiddle with the code before bending stuff, especially when said stuff is already working.</p>
<p><strong>Update Feb 25:</strong> Added a button to switch walking states. Button is on Arduino pin2 so it can be triggered via an <a href="http://www.arduino.cc/en/Reference/AttachInterrupt">interrupt</a>. It simply switches between walkForward, walkBackward, and nothing (no walking). Thanks to <a href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1223543716/11">this post</a> for teaching me how to debounce a button with an interrupt.</p>
<p class="flickrTag_container"><a href="http://farm4.static.flickr.com/3477/3302842744_4ac7e8b91a.jpg" class="flickr" title="My first ever walking robot. Yippee. See more about it &lt;a href=&quot;http://del.rudforce.com/&quot;&gt;here&lt;/a&gt; &lt;a href=&quot;http://www.flickr.com/photos/13372682@N00/3302842744/&quot;&gt;view&amp;nbsp;on&amp;nbsp;flickr&amp;raquo;&lt;/a&gt;" rel="lightbox"><img src="http://farm4.static.flickr.com/3477/3302842744_4ac7e8b91a_m.jpg" alt="Array" class="flickr small photo" /></a></p>

<div class="wp_codebox_msgheader wp_codebox_hide"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p329code2'); return false;">View Code</a> C</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p3292"><td class="code" id="p329code2"><pre class="c" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// walker 0</span>
<span style="color: #666666; font-style: italic;">// DR</span>
<span style="color: #666666; font-style: italic;">//    Feb 22, 2009 - initial version, walked forward</span>
<span style="color: #666666; font-style: italic;">//    Feb 24, 2009 - Added reverse</span>
<span style="color: #666666; font-style: italic;">//    Feb 25, 2009 - added button!</span>
&nbsp;
<span style="color: #339933;">#include &lt;Servo.h&gt;;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// default centers of servos</span>
<span style="color: #993333;">int</span> fCenter <span style="color: #339933;">=</span> <span style="color: #0000dd;">93</span><span style="color: #339933;">;</span>
<span style="color: #993333;">int</span> rCenter <span style="color: #339933;">=</span> <span style="color: #0000dd;">85</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #993333;">volatile</span> <span style="color: #993333;">int</span> walkState <span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span>  <span style="color: #666666; font-style: italic;">// don't walk until button is pressed</span>
<span style="color: #993333;">int</span> buttonPin <span style="color: #339933;">=</span> <span style="color: #0000dd;">2</span><span style="color: #339933;">;</span>  <span style="color: #666666; font-style: italic;">// button on arduino pin2 (avr pin4) for interrupt</span>
&nbsp;
Servo servF<span style="color: #339933;">;</span>  <span style="color: #666666; font-style: italic;">// front servo</span>
Servo servR<span style="color: #339933;">;</span>  <span style="color: #666666; font-style: italic;">// rear servo</span>
<span style="color: #993333;">void</span> setup<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
  pinMode<span style="color: #009900;">&#40;</span>buttonPin<span style="color: #339933;">,</span> INPUT<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  digitalWrite<span style="color: #009900;">&#40;</span>buttonPin<span style="color: #339933;">,</span> HIGH<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>  <span style="color: #666666; font-style: italic;">// set internal pullup resistor</span>
  attachInterrupt<span style="color: #009900;">&#40;</span><span style="color: #0000dd;">0</span><span style="color: #339933;">,</span> changeState<span style="color: #339933;">,</span> LOW<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>  <span style="color: #666666; font-style: italic;">// interrupt0 is on arduino pin2</span>
&nbsp;
  servF.<span style="color: #202020;">attach</span><span style="color: #009900;">&#40;</span><span style="color: #0000dd;">9</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>  <span style="color: #666666; font-style: italic;">// front servo on pin9</span>
  servF.<span style="color: #202020;">write</span><span style="color: #009900;">&#40;</span>fCenter<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>  <span style="color: #666666; font-style: italic;">// center</span>
  servR.<span style="color: #202020;">attach</span><span style="color: #009900;">&#40;</span><span style="color: #0000dd;">10</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// rear servo on pin10</span>
  servR.<span style="color: #202020;">write</span><span style="color: #009900;">&#40;</span>rCenter<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>  <span style="color: #666666; font-style: italic;">// center</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #993333;">void</span> walkForward<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  servF.<span style="color: #202020;">write</span><span style="color: #009900;">&#40;</span>fCenter<span style="color: #339933;">+</span><span style="color: #0000dd;">20</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  delay<span style="color: #009900;">&#40;</span><span style="color: #0000dd;">100</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  servR.<span style="color: #202020;">write</span><span style="color: #009900;">&#40;</span>rCenter<span style="color: #339933;">-</span><span style="color: #0000dd;">15</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  delay<span style="color: #009900;">&#40;</span><span style="color: #0000dd;">400</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  servF.<span style="color: #202020;">write</span><span style="color: #009900;">&#40;</span>fCenter<span style="color: #339933;">-</span><span style="color: #0000dd;">20</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  delay<span style="color: #009900;">&#40;</span><span style="color: #0000dd;">100</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  servR.<span style="color: #202020;">write</span><span style="color: #009900;">&#40;</span>rCenter<span style="color: #339933;">+</span><span style="color: #0000dd;">15</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  delay<span style="color: #009900;">&#40;</span><span style="color: #0000dd;">400</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #993333;">void</span> walkBackward<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  servF.<span style="color: #202020;">write</span><span style="color: #009900;">&#40;</span>fCenter<span style="color: #339933;">+</span><span style="color: #0000dd;">20</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  delay<span style="color: #009900;">&#40;</span><span style="color: #0000dd;">100</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  servR.<span style="color: #202020;">write</span><span style="color: #009900;">&#40;</span>rCenter<span style="color: #339933;">+</span><span style="color: #0000dd;">20</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  delay<span style="color: #009900;">&#40;</span><span style="color: #0000dd;">400</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  servF.<span style="color: #202020;">write</span><span style="color: #009900;">&#40;</span>fCenter<span style="color: #339933;">-</span><span style="color: #0000dd;">20</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  delay<span style="color: #009900;">&#40;</span><span style="color: #0000dd;">100</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  servR.<span style="color: #202020;">write</span><span style="color: #009900;">&#40;</span>rCenter<span style="color: #339933;">-</span><span style="color: #0000dd;">20</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  delay<span style="color: #009900;">&#40;</span><span style="color: #0000dd;">400</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #993333;">void</span> changeState<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #993333;">static</span> <span style="color: #993333;">unsigned</span> <span style="color: #993333;">long</span> last_int_time <span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span>
  <span style="color: #993333;">unsigned</span> <span style="color: #993333;">long</span> int_time <span style="color: #339933;">=</span> millis<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span>int_time <span style="color: #339933;">-</span> last_int_time <span style="color: #339933;">&gt;</span> <span style="color: #0000dd;">150</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>  <span style="color: #666666; font-style: italic;">// if time since last calling is less than 150 it's likely a bounce</span>
    <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span>walkState <span style="color: #339933;">==</span> <span style="color: #0000dd;">0</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
      walkState <span style="color: #339933;">=</span> <span style="color: #0000dd;">1</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span>walkState <span style="color: #339933;">==</span> <span style="color: #0000dd;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
      walkState <span style="color: #339933;">=</span> <span style="color: #0000dd;">2</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #b1b100;">else</span><span style="color: #009900;">&#123;</span>
      walkState <span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
  <span style="color: #009900;">&#125;</span>
  last_int_time <span style="color: #339933;">=</span> int_time<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #993333;">void</span> loop<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
  <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span>walkState <span style="color: #339933;">==</span> <span style="color: #0000dd;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    walkForward<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span><span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span>walkState <span style="color: #339933;">==</span> <span style="color: #0000dd;">2</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    walkBackward<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>
]]></content:encoded>
			<wfw:commentRss>http://del.rudforce.com/robots/walker-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My first walker!</title>
		<link>http://del.rudforce.com/2009/02/my-first-walker/</link>
		<comments>http://del.rudforce.com/2009/02/my-first-walker/#comments</comments>
		<pubDate>Mon, 23 Feb 2009 04:38:46 +0000</pubDate>
		<dc:creator>Del</dc:creator>
				<category><![CDATA[Default]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[avr]]></category>
		<category><![CDATA[Electronics]]></category>
		<category><![CDATA[pictures]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[pseuduino]]></category>
		<category><![CDATA[Robotics]]></category>
		<category><![CDATA[robots]]></category>
		<category><![CDATA[toys]]></category>

		<guid isPermaLink="false">http://del.rudforce.com/?p=324</guid>
		<description><![CDATA[I built  today. After trying to figure out a biped from my (near 30 year old) pile of Erector Set parts I ended up making a two-servo, four-legged walker instead.]]></description>
			<content:encoded><![CDATA[<p>I built <a href="http://del.rudforce.com/robots/walker-0/">my first walker</a> today. After trying to figure out a biped from my (near 30 year old) pile of Erector Set parts I ended up making a two-servo, four-legged walker instead.</p>
<p class="flickrTag_container"><a href="http://farm4.static.flickr.com/3477/3302842744_4ac7e8b91a.jpg" class="flickr" title="My first ever walking robot. Yippee. See more about it &lt;a href=&quot;http://del.rudforce.com/&quot;&gt;here&lt;/a&gt; &lt;a href=&quot;http://www.flickr.com/photos/13372682@N00/3302842744/&quot;&gt;view&amp;nbsp;on&amp;nbsp;flickr&amp;raquo;&lt;/a&gt;" rel="lightbox"><img src="http://farm4.static.flickr.com/3477/3302842744_4ac7e8b91a_m.jpg" alt="Array" class="flickr small photo" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://del.rudforce.com/2009/02/my-first-walker/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
