我想找...

搜尋

分享

目錄

AIServo constructor

[AIServo86]

描述

Initialize the AIServo object.

語法

AIServo myservo

參數

範例

#include <AIServo86.h>
 
AIServoPort(ROBOTIS, AX12) bus; // Initialize bus to control ROBOTIS AX-12 servo
AIServo myservo; // initialize myservo
 
void setup()
{
   bus.begin(Serial1, 1000000); // Set the serial port used by the bus as Serial1, and the baud rate as 1000000
   myservo.attach(bus, 9); // mount myservo to the bus, and the ID of myservo is 9
   myservo.write(150); // start the servo and turn it to 150 degrees
}
 
void loop() {}

參考


函式庫參考主頁面

86Duino 參考的文本是根據 知識共享署名-相同方式分享 3.0 許可證,部分文本是從 Arduino 參考 修改的。 參考中的代碼示例已發佈到公共領域。

返回頂端