Servo.detach()

来自Microduino Wikipedia
跳转至: 导航搜索

Servo.detach()


作用

将当前舵机断开连接


参数


返回值


示例

#include <Servo.h>

Servo myservo;  // create servo object to control a servo
// a maximum of eight servo objects can be created

#define servoPin  D9

int pos = 0;    // variable to store the servo position

void setup()
{
  myservo.attach(servoPin);  // attaches the servo on pin 9 to the servo object
}

void loop()
{

}


其他

Servo

Servo.attach()

Servo.write()

Servo.writeMicroseconds()

Servo.read()

Servo.readMicroseconds()

Servo.attached()



返回Servo_Reference页面