<?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>Nomeist &#187; servo</title>
	<atom:link href="http://nomeist.com/category/servo/feed" rel="self" type="application/rss+xml" />
	<link>http://nomeist.com</link>
	<description>Monome Adventures</description>
	<lastBuildDate>Tue, 30 Mar 2010 02:44:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Arduino to Servo</title>
		<link>http://nomeist.com/arduino-to-servo/168</link>
		<comments>http://nomeist.com/arduino-to-servo/168#comments</comments>
		<pubDate>Sun, 15 Feb 2009 02:50:21 +0000</pubDate>
		<dc:creator>JP</dc:creator>
				<category><![CDATA[Build Process]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[servo]]></category>

		<guid isPermaLink="false">http://nomeist.com/?p=168</guid>
		<description><![CDATA[Spent a couple of minutes this afternoon playing around with my new SG90 servos I picked up on ebay for a steal. Initially I just wanted to get them talking with an arduino &#8211; which although initially looked easy, was a bit of a time vampire. Anyway, trick seems to be code like that attached, [...]]]></description>
			<content:encoded><![CDATA[<p>Spent a couple of minutes this afternoon playing around with my new SG90 servos I picked up on ebay for a steal. Initially I just wanted to get them talking with an arduino &#8211; which although initially looked easy, was a bit of a time vampire.  Anyway, trick seems to be code like that attached, and ensuring you have the 5v unplugged until everything has updated and started (no idea why, but seems the loading voltage changes seems to freak the servo out.</p>
<p><code><br />
int signalPin = 8; //servo signal pin</p>
<p>void setup()<br />
{<br />
 pinMode(signalPin, OUTPUT);<br />
}</p>
<p>void loop()<br />
{<br />
  for (int i=0; i <= 100; i++)     // turn to CCW end, hold 2 seconds<br />
   {<br />
   digitalWrite(signalPin, HIGH);  // control signal high<br />
   delayMicroseconds(900);        //   for 900 uS<br />
   digitalWrite(signalPin, LOW);   // control signal low<br />
   delay(10);                      // wait 20mS<br />
   }</p>
<p>  for (int i=0; i <= 50; i++)     // turn to CW end, hold 2 seconds<br />
   {<br />
   digitalWrite(signalPin, HIGH);  // control signal high<br />
   delayMicroseconds(1100);        //   for 1500 uS<br />
   digitalWrite(signalPin, LOW);   // control signal low<br />
   delay(1);                      // wait 20mS<br />
   }</p>
<p> }</p>
<p></code></p>
<p>Some useful reference sites, but be aware that neither of these I could get the code to work, but probably more my issue than the code:</p>
<p><a href="http://principialabs.com/arduino-serial-servo-control/">http://principialabs.com/arduino-serial-servo-control/</a><br />
<a href="http://itp.nyu.edu/physcomp/Labs/AnalogIn">http://itp.nyu.edu/physcomp/Labs/AnalogIn</a></p>
<p>Next step, aiming low, I want to get a button in max that will trigger the servo movement:</p>
<p><a href="http://www.cycling74.com/forums/index.php?t=msg&#038;goto=165203">http://www.cycling74.com/forums/index.php?t=msg&#038;goto=165203</a></p>
<p>Once I have that, I just need to replicate the action with the 6 other servos, work out how to attach hammers to them all, and then add some sort of step sequencer in max so I can have a 6 note analog drum kit.... that is until my xylophone arrives.</p>
]]></content:encoded>
			<wfw:commentRss>http://nomeist.com/arduino-to-servo/168/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
