AIServo.attach()

[AIServo86]

説明

Mount AIServo.

Syntax

servo.attach(bus, ID)

Parameters

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

Returns

None.

Example

#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() {}

See also


Libraries Reference Home

86Duino のリファレンスのテキストは Arduino レファレンス を編集したもので、 Creative Commons Attribution-ShareAlike 3.0 License下でライセンスされています。リファレンス内のコードサンプルはパブリックドメインとして公開されています。

コメントする

上部へスクロール