[AIServo86]
説明
Assign the list of target positions representing Frame to each servo.
構文
asiervoframerobotis.setPositions()
asiervoframerobotis.setPositions(servo1)
asiervoframerobotis.setPositions(servo1, servo2)
asiervoframerobotis.setPositions(servo1, servo2, ... , servo64)
asiervoframerobotis.setPositions(time)
asiervoframerobotis.setPositions(time, servo1)
asiervoframerobotis.setPositions(time, servo1, servo2)
asiervoframerobotis.setPositions(time, servo1, servo2, ... , servo64)
媒介変数
aiservoframerobotis: Variable of AIServoFrameRobotis type.servo1 ~ servo64: The variables of AIServo type.time(optional): If no setting value is entered or the setting value is 0, it means the servo will rotate at full speed.
戻り値
なし
例
#include <AIServo86.h>
AIServoPort(ROBOTIS, AX12) bus;
AIServo myservo0;
AIServo myservo1;
AIServo myservo2;
AIServoFrameRobotis myframe; // Declare an AIServoFrameRobotis object
void setup()
{
bus.begin(Serial1, 1000000);
myservo0. attach(bus, 9);
myservo1. attach(bus, 11);
myservo2. attach(bus, 5);
myframe.positions[0] = 180; // set Frame content
myframe. positions[1] = 130;
myframe. positions[2] = 200;
// Set the time to rotate the servo to the position specified by Frame (myservo0 rotates to position[0]
// position, myservo1 rotates to position[1], myservo2 rotates to position[2])
myframe.setPositions(500, myservo0, myservo1, myservo2);
aiservoMultiRun(); // Rotate all servos according to the set value
}
void loop() {}参照
ライブラリリファレンスホーム
86Duinoリファレンスのテキストは、Arduinoリファレンスを改変したもので、Creative Commons Attribution-ShareAlike 3.0ライセンスに基づいてライセンスされています。リファレンス内のコードサンプルはパブリックドメインとして公開されています。