<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh-CN">
		<id>http:///https//wiki.microduino.cn/index.php?action=history&amp;feed=atom&amp;title=Servo_Application</id>
		<title>Servo Application - 版本历史</title>
		<link rel="self" type="application/atom+xml" href="http:///https//wiki.microduino.cn/index.php?action=history&amp;feed=atom&amp;title=Servo_Application"/>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=Servo_Application&amp;action=history"/>
		<updated>2026-04-30T02:45:08Z</updated>
		<subtitle>本wiki的该页面的版本历史</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>https//wiki.microduino.cn/index.php?title=Servo_Application&amp;diff=8521&amp;oldid=prev</id>
		<title>1304410487@qq.com：Created page with &quot;{| style=&quot;width: 800px;&quot; |- | ==Purpose==  This tutorial shows you the way to use servo under mCookie.     ==Equipment== *'''Microduino-CoreUSB''' *'''Microduino-Servo...&quot;</title>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=Servo_Application&amp;diff=8521&amp;oldid=prev"/>
				<updated>2015-06-12T03:19:56Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;{| style=&amp;quot;width: 800px;&amp;quot; |- | ==Purpose==  This tutorial shows you the way to use servo under mCookie.     ==Equipment== *&amp;#039;&amp;#039;&amp;#039;&lt;a href=&quot;/index.php/Microduino-CoreUSB&quot; title=&quot;Microduino-CoreUSB&quot;&gt;Microduino-CoreUSB&lt;/a&gt;&amp;#039;&amp;#039;&amp;#039; *&amp;#039;&amp;#039;&amp;#039;&lt;a href=&quot;/index.php?title=Microduino-Servo&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Microduino-Servo（页面不存在）&quot;&gt;Microduino-Servo&lt;/a&gt;...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{| style=&amp;quot;width: 800px;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
==Purpose==&lt;br /&gt;
&lt;br /&gt;
This tutorial shows you the way to use servo under mCookie.   &lt;br /&gt;
&lt;br /&gt;
==Equipment==&lt;br /&gt;
*'''[[Microduino-CoreUSB]]'''&lt;br /&gt;
*'''[[Microduino-Servo]]'''&lt;br /&gt;
*'''[[Microduino-Sensorhub]]'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Other Hardwar Equipment  &lt;br /&gt;
**USB cable   One &lt;br /&gt;
&lt;br /&gt;
==Program==&lt;br /&gt;
&lt;br /&gt;
  #include &amp;lt;Servo.h&amp;gt; &lt;br /&gt;
   &lt;br /&gt;
  Servo myservo;  // create servo object to control a servo &lt;br /&gt;
                  // a maximum of eight servo objects can be created &lt;br /&gt;
   &lt;br /&gt;
  int pos = 0;    // variable to store the servo position &lt;br /&gt;
   &lt;br /&gt;
  void setup() &lt;br /&gt;
  { &lt;br /&gt;
    myservo.attach(9);  // attaches the servo on pin 9 to the servo object &lt;br /&gt;
  } &lt;br /&gt;
   &lt;br /&gt;
   &lt;br /&gt;
  void loop() &lt;br /&gt;
  { &lt;br /&gt;
    for(pos = 0; pos &amp;lt; 180; pos += 1)  // goes from 0 degrees to 180 degrees &lt;br /&gt;
    {                                  // in steps of 1 degree &lt;br /&gt;
      myservo.write(pos);              // tell servo to go to position in variable 'pos' &lt;br /&gt;
      delay(15);                       // waits 15ms for the servo to reach the position &lt;br /&gt;
    } &lt;br /&gt;
    for(pos = 180; pos&amp;gt;=1; pos-=1)     // goes from 180 degrees to 0 degrees &lt;br /&gt;
    {                                &lt;br /&gt;
      myservo.write(pos);              // tell servo to go to position in variable 'pos' &lt;br /&gt;
      delay(15);                       // waits 15ms for the servo to reach the position &lt;br /&gt;
    } &lt;br /&gt;
  } &lt;br /&gt;
==Debugging==&lt;br /&gt;
&lt;br /&gt;
Step 1: &lt;br /&gt;
Plug Microduino servo to D9 pin of Microduino-Sensorhub.  &lt;br /&gt;
[[File:McookieServoSensor.png|600px|center|thumb]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Step 2:&lt;br /&gt;
Connect USB cable to your PC, download the code and program it to Microduino-CoreUSB. &lt;br /&gt;
[[File:McookieServoSensor1.png|600px|center|thumb]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Step 3:   &lt;br /&gt;
After programming, the servo will swing among the reading of 0 to 180.   &lt;br /&gt;
[[File:McookieServoSensor2.png|600px|center|thumb]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Step 4: &lt;br /&gt;
Try to change the angle of swing repeatedly and see if it is accuracy. &lt;br /&gt;
[[File:McookieServoSensor3.png|600px|center|thumb]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Result==&lt;br /&gt;
&lt;br /&gt;
You can control the servo and make it swing to a certain angle.  &lt;br /&gt;
&lt;br /&gt;
==Video==&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>1304410487@qq.com</name></author>	</entry>

	</feed>