<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Controlling a Servo with Arduino</title>
	<atom:link href="http://luckylarry.co.uk/arduino-projects/controlling-a-servo-with-arduino/feed/" rel="self" type="application/rss+xml" />
	<link>http://luckylarry.co.uk/arduino-projects/controlling-a-servo-with-arduino/</link>
	<description></description>
	<lastBuildDate>Tue, 07 Feb 2012 14:19:44 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=492</generator>
	<item>
		<title>By: Jesse</title>
		<link>http://luckylarry.co.uk/arduino-projects/controlling-a-servo-with-arduino/comment-page-1/#comment-9173</link>
		<dc:creator>Jesse</dc:creator>
		<pubDate>Sat, 17 Dec 2011 04:13:52 +0000</pubDate>
		<guid isPermaLink="false">http://luckylarry.co.uk/?p=44#comment-9173</guid>
		<description>Hey Larry,
I have a question.  I have a JRservo DS8711, which I need to control with some specific tolerances.  Max input voltage is 6. I am very ignorant to the way the Arduino works and would like some info to how this thing could help me accomplish this.  I would like to supply the servo with the max voltage it can take simple to get the max oz/in out of it.  What Arduino would you recommend?

Thank you for and help.
Jesse</description>
		<content:encoded><![CDATA[<p>Hey Larry,<br />
I have a question.  I have a JRservo DS8711, which I need to control with some specific tolerances.  Max input voltage is 6. I am very ignorant to the way the Arduino works and would like some info to how this thing could help me accomplish this.  I would like to supply the servo with the max voltage it can take simple to get the max oz/in out of it.  What Arduino would you recommend?</p>
<p>Thank you for and help.<br />
Jesse</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rasik Kanji</title>
		<link>http://luckylarry.co.uk/arduino-projects/controlling-a-servo-with-arduino/comment-page-1/#comment-6092</link>
		<dc:creator>Rasik Kanji</dc:creator>
		<pubDate>Tue, 24 May 2011 21:11:54 +0000</pubDate>
		<guid isPermaLink="false">http://luckylarry.co.uk/?p=44#comment-6092</guid>
		<description>hi sorry just wanted to ask is it possible to control one servo with 2 sensors</description>
		<content:encoded><![CDATA[<p>hi sorry just wanted to ask is it possible to control one servo with 2 sensors</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mark</title>
		<link>http://luckylarry.co.uk/arduino-projects/controlling-a-servo-with-arduino/comment-page-1/#comment-6032</link>
		<dc:creator>mark</dc:creator>
		<pubDate>Mon, 02 May 2011 14:10:05 +0000</pubDate>
		<guid isPermaLink="false">http://luckylarry.co.uk/?p=44#comment-6032</guid>
		<description>sorry I didn&#039;t copy my whole loop equation:
void loop()
{
for(pos = 0)
val = analogRead(inPin);  // read the Hall Effect Sensor
if (val &gt; (mean + sensitivity) &#124;&#124; val  (mean + sensitivity) &#124;&#124; val &lt; (mean - sensitivity)) 
{
digitalWrite(myservo, pos -= 170);  // goes from 170 degrees to 0 degrees
myservo.write(pos);              // tell servo to go to position in variable ‘pos’
}
}</description>
		<content:encoded><![CDATA[<p>sorry I didn&#8217;t copy my whole loop equation:<br />
void loop()<br />
{<br />
for(pos = 0)<br />
val = analogRead(inPin);  // read the Hall Effect Sensor<br />
if (val &gt; (mean + sensitivity) || val  (mean + sensitivity) || val &lt; (mean &#8211; sensitivity))<br />
{<br />
digitalWrite(myservo, pos -= 170);  // goes from 170 degrees to 0 degrees<br />
myservo.write(pos);              // tell servo to go to position in variable ‘pos’<br />
}<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mark</title>
		<link>http://luckylarry.co.uk/arduino-projects/controlling-a-servo-with-arduino/comment-page-1/#comment-6031</link>
		<dc:creator>mark</dc:creator>
		<pubDate>Mon, 02 May 2011 14:07:45 +0000</pubDate>
		<guid isPermaLink="false">http://luckylarry.co.uk/?p=44#comment-6031</guid>
		<description>Hi I am trying to use this servo setup but I am trying to make the servo only trigger when the hall effect sensor goes off.  I have the following function but I am getting an error when trying to setup the servo as the output for the hall effect sensor.  Can you please help me correct this.

#include  //include the servo libary

Servo myservo;  // create servo object to control a servo
// a maximum of eight servo objects can be created

int pos = 0;    // variable to store the servo position
int inPin = 8;    // select the input pin for the Hall Effect Sensor
int val = 0;       // variable to store the value coming from the sensor
int mean = 508;
int sensitivity = 20;

void setup()
{
myservo.attach(9);  // attaches the servo on pin 9 to the servo object
{
 pinMode(myservo, OUTPUT);  // declare the ledPin as an OUTPUT
}
}

void loop()
{
for(pos = 0)
val = analogRead(inPin);  // read the Hall Effect Sensor
if (val &gt; (mean + sensitivity) &#124;&#124; val  (mean + sensitivity) &#124;&#124; val &lt; (mean - sensitivity)) 
{
digitalWrite(myservo, pos -= 170);  // goes from 170 degrees to 0 degrees
myservo.write(pos);              // tell servo to go to position in variable ‘pos’
}
}</description>
		<content:encoded><![CDATA[<p>Hi I am trying to use this servo setup but I am trying to make the servo only trigger when the hall effect sensor goes off.  I have the following function but I am getting an error when trying to setup the servo as the output for the hall effect sensor.  Can you please help me correct this.</p>
<p>#include  //include the servo libary</p>
<p>Servo myservo;  // create servo object to control a servo<br />
// a maximum of eight servo objects can be created</p>
<p>int pos = 0;    // variable to store the servo position<br />
int inPin = 8;    // select the input pin for the Hall Effect Sensor<br />
int val = 0;       // variable to store the value coming from the sensor<br />
int mean = 508;<br />
int sensitivity = 20;</p>
<p>void setup()<br />
{<br />
myservo.attach(9);  // attaches the servo on pin 9 to the servo object<br />
{<br />
 pinMode(myservo, OUTPUT);  // declare the ledPin as an OUTPUT<br />
}<br />
}</p>
<p>void loop()<br />
{<br />
for(pos = 0)<br />
val = analogRead(inPin);  // read the Hall Effect Sensor<br />
if (val &gt; (mean + sensitivity) || val  (mean + sensitivity) || val &lt; (mean &#8211; sensitivity))<br />
{<br />
digitalWrite(myservo, pos -= 170);  // goes from 170 degrees to 0 degrees<br />
myservo.write(pos);              // tell servo to go to position in variable ‘pos’<br />
}<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: getandistr</title>
		<link>http://luckylarry.co.uk/arduino-projects/controlling-a-servo-with-arduino/comment-page-1/#comment-5879</link>
		<dc:creator>getandistr</dc:creator>
		<pubDate>Fri, 08 Apr 2011 15:48:51 +0000</pubDate>
		<guid isPermaLink="false">http://luckylarry.co.uk/?p=44#comment-5879</guid>
		<description>I&#039;ve come up with this.  I can&#039;t test it until the hall effect sensor comes in but could you tell me if this will work.

#include  //include the servo libary

Servo myservo;  // create servo object to control a servo
// a maximum of eight servo objects can be created

int pos = 0;    // variable to store the servo position
int inPin = 8;    // select the input pin for the Hall Effect Sensor
int val = 0;       // variable to store the value coming from the sensor
int mean = 508;
int sensitivity = 20;

void setup()
{
myservo.attach(9);  // attaches the servo on pin 9 to the servo object
{
 pinMode(myservo, OUTPUT);  // declare the ledPin as an OUTPUT
}
}

void loop()
{
for(pos = 0)
val = analogRead(inPin);  // read the Hall Effect Sensor
if (val &gt; (mean + sensitivity) &#124;&#124; val  (mean + sensitivity) &#124;&#124; val &lt; (mean - sensitivity)) 
{
digitalWrite(myservo, pos -= 170);  // goes from 170 degrees to 0 degrees
myservo.write(pos);              // tell servo to go to position in variable ‘pos’
}
}</description>
		<content:encoded><![CDATA[<p>I&#8217;ve come up with this.  I can&#8217;t test it until the hall effect sensor comes in but could you tell me if this will work.</p>
<p>#include  //include the servo libary</p>
<p>Servo myservo;  // create servo object to control a servo<br />
// a maximum of eight servo objects can be created</p>
<p>int pos = 0;    // variable to store the servo position<br />
int inPin = 8;    // select the input pin for the Hall Effect Sensor<br />
int val = 0;       // variable to store the value coming from the sensor<br />
int mean = 508;<br />
int sensitivity = 20;</p>
<p>void setup()<br />
{<br />
myservo.attach(9);  // attaches the servo on pin 9 to the servo object<br />
{<br />
 pinMode(myservo, OUTPUT);  // declare the ledPin as an OUTPUT<br />
}<br />
}</p>
<p>void loop()<br />
{<br />
for(pos = 0)<br />
val = analogRead(inPin);  // read the Hall Effect Sensor<br />
if (val &gt; (mean + sensitivity) || val  (mean + sensitivity) || val &lt; (mean &#8211; sensitivity))<br />
{<br />
digitalWrite(myservo, pos -= 170);  // goes from 170 degrees to 0 degrees<br />
myservo.write(pos);              // tell servo to go to position in variable ‘pos’<br />
}<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: larry</title>
		<link>http://luckylarry.co.uk/arduino-projects/controlling-a-servo-with-arduino/comment-page-1/#comment-5877</link>
		<dc:creator>larry</dc:creator>
		<pubDate>Fri, 08 Apr 2011 15:17:10 +0000</pubDate>
		<guid isPermaLink="false">http://luckylarry.co.uk/?p=44#comment-5877</guid>
		<description>The servo interface isn&#039;t too bad. wire in one servo to the Arduino, 2 of the wires are for power, and the other goes to any digital output pin on the Arduino.

The code is fairly simple to tell the servo what position to set to:

#include  //include the servo libary
Servo myservo; 
int pos = 0;    // variable to store the servo position (0-179)

void setup()
{
myservo.attach(9);  // attaches the servo on pin 9 - can be any number
}

void loop()
{
myservo.write(pos); // sets the servo
}


So if you do a hall effect sensor, you then look for the a signal from that (which I have no idea) and that&#039;ll be an if statement in that loop():


void loop()
{
if (hallEffectSensor==true){
myservo.write(180); 
} else {
myservo.write(0); 
}
}</description>
		<content:encoded><![CDATA[<p>The servo interface isn&#8217;t too bad. wire in one servo to the Arduino, 2 of the wires are for power, and the other goes to any digital output pin on the Arduino.</p>
<p>The code is fairly simple to tell the servo what position to set to:</p>
<p>#include  //include the servo libary<br />
Servo myservo;<br />
int pos = 0;    // variable to store the servo position (0-179)</p>
<p>void setup()<br />
{<br />
myservo.attach(9);  // attaches the servo on pin 9 &#8211; can be any number<br />
}</p>
<p>void loop()<br />
{<br />
myservo.write(pos); // sets the servo<br />
}</p>
<p>So if you do a hall effect sensor, you then look for the a signal from that (which I have no idea) and that&#8217;ll be an if statement in that loop():</p>
<p>void loop()<br />
{<br />
if (hallEffectSensor==true){<br />
myservo.write(180);<br />
} else {<br />
myservo.write(0);<br />
}<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: getandistr</title>
		<link>http://luckylarry.co.uk/arduino-projects/controlling-a-servo-with-arduino/comment-page-1/#comment-5876</link>
		<dc:creator>getandistr</dc:creator>
		<pubDate>Fri, 08 Apr 2011 14:56:16 +0000</pubDate>
		<guid isPermaLink="false">http://luckylarry.co.uk/?p=44#comment-5876</guid>
		<description>Thanks Larry I will look into the hall effect sensor.  My problem though is the actual programming to make the servo do what I need it to do.  I am a novice to this type of programming and I need to complete my project in the next week.  Do I link it to one of the other pins and tell the audrino to move the servo when the other pin detects a signal? If so how do I do this?</description>
		<content:encoded><![CDATA[<p>Thanks Larry I will look into the hall effect sensor.  My problem though is the actual programming to make the servo do what I need it to do.  I am a novice to this type of programming and I need to complete my project in the next week.  Do I link it to one of the other pins and tell the audrino to move the servo when the other pin detects a signal? If so how do I do this?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: larry</title>
		<link>http://luckylarry.co.uk/arduino-projects/controlling-a-servo-with-arduino/comment-page-1/#comment-5847</link>
		<dc:creator>larry</dc:creator>
		<pubDate>Fri, 08 Apr 2011 11:02:47 +0000</pubDate>
		<guid isPermaLink="false">http://luckylarry.co.uk/?p=44#comment-5847</guid>
		<description>Have a look at hall effect sensors instead and have a magnet that passes past the sensor, the hall effect signal can be sent to the Arduino to then on detection execute the desired code.</description>
		<content:encoded><![CDATA[<p>Have a look at hall effect sensors instead and have a magnet that passes past the sensor, the hall effect signal can be sent to the Arduino to then on detection execute the desired code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: getandistr</title>
		<link>http://luckylarry.co.uk/arduino-projects/controlling-a-servo-with-arduino/comment-page-1/#comment-5840</link>
		<dc:creator>getandistr</dc:creator>
		<pubDate>Wed, 06 Apr 2011 17:59:35 +0000</pubDate>
		<guid isPermaLink="false">http://luckylarry.co.uk/?p=44#comment-5840</guid>
		<description>So I understand how to program the servo and have done so, so that it starts at 0 goes to 170 then back to 0.  Now I have a magnetic counter where whenever a piece of metal passes in front of it it closes the circuit.  I want to add this to my system so that the closed circuit can signal the servo to go from 0 to 170 and then when it closes again it signals the servo to go from 170 back to 0.  How can I program it to do this?</description>
		<content:encoded><![CDATA[<p>So I understand how to program the servo and have done so, so that it starts at 0 goes to 170 then back to 0.  Now I have a magnetic counter where whenever a piece of metal passes in front of it it closes the circuit.  I want to add this to my system so that the closed circuit can signal the servo to go from 0 to 170 and then when it closes again it signals the servo to go from 170 back to 0.  How can I program it to do this?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: larry</title>
		<link>http://luckylarry.co.uk/arduino-projects/controlling-a-servo-with-arduino/comment-page-1/#comment-1828</link>
		<dc:creator>larry</dc:creator>
		<pubDate>Wed, 23 Jun 2010 13:47:27 +0000</pubDate>
		<guid isPermaLink="false">http://luckylarry.co.uk/?p=44#comment-1828</guid>
		<description>yup. the servo library can support 8 servos I think. You just need to use PWM via each pot to control the servos. You&#039;re only limited by the Arduino board but then you can use shift registers if you dont want the servos moving at the same time.</description>
		<content:encoded><![CDATA[<p>yup. the servo library can support 8 servos I think. You just need to use PWM via each pot to control the servos. You&#8217;re only limited by the Arduino board but then you can use shift registers if you dont want the servos moving at the same time.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

