...
http://arduino.cc/en/Reference/Servo
|
|
---|
Code Block |
---|
language | cpp |
---|
theme | Confluence |
---|
| #include <Servo.h>
Servo servo_7;
void setup()
{
servo_7.attach(7);
}
void loop()
{
servo_7.write(45);
delay(10);
}
/* servo connected to pin 7 will maintain an angle of 45o */
]] ></ac:plain-text-body></ac:structured- |
|
...
macro></div></td><td><div class="content-wrapper"><p><ac:image ac:thumbnail="true" ac:width="300"><ri:attachment ri:filename="image2020-1-20_17-58-31.png" /></ac:image></p></div></td></tr></tbody></table><p><br /></p><p><br /></p><p><br /></p><p><ac:image ac:height="250"><ri:attachment ri:filename="image2019-12-28_18-47-48.png" /></ac:image></p><p>Caution : Do not overload the servo. The servo and your battery / power source could be damaged if servo is overloaded.</p><p>Do not power the servo from a 9V battery. Most servos can’t take > 6V.</p><h3>Screencast</h3><p><ac:structured-macro ac:name="widget" ac:schema-version="1" ac:macro-id="4f3b12bf-2ec6-47f2-8da6-fe0a18b2e88f"><ac:parameter ac:name="url"><ri:url ri:value="http://youtube.com/watch?v=ONOb1EgSv0s" /></ac:parameter></ac:structured-macro></p><p><br /></p> |
|