Servo 建构子
描述
初始化 Servo 类别。
语法
Servo myservo
参数
范例
#include <Servo86.h>
Servo myservo; // 初始化 myservo
void setup()
{
myservo.attach(9); // 设定 pin 9 为 Servo 脚位
myservo.write(1500); // 启动伺服机并转到 1500us 角度
}
void loop() {}
See also
- attach()
- attached()
- write()
The text of the 86Duino reference is a modification of the Arduino reference, and is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.
