AIServo.attach()

[AIServo86]

描述

Mount AIServo.

語法

servo.attach(bus, ID)

參數

  • servo: Variable of the AIServo type.
  • bus: The object generated by the AIServoPort (Vendor, Servo) declaration.
  • ID: The ID of the servo.

回傳

範例

#include <AIServo86.h>
 
AIServoPort(ROBOTIS, AX12) bus;
AIServo myservo;
 
void setup()
{
   bus.begin(Serial1, 1000000);
   myservo.attach(bus, 9); // mount myservo to the bus, and the ID of myservo is 9
}
 
void loop() {}

參考


函式庫參考主頁面

86Duino 參考的文本是根據 Creative Commons Attribution-ShareAlike 3.0 License,部分文本是從 the Arduino reference 修改的。 參考中的代碼示例已發佈到公共領域。

發表評論

上部へスクロール