[AIservo86]
描述
Disables the curve interpolation function enabled by aiservoBeginSplineMotion(). This feature is supported from Coding 315 onwards.
語法
aiservoEndSplineMotion();
參數
無
回傳
無
範例
#include "AIServo86.h"
AIServo Servo1;
AIServo Servo2;
AIServo Servo3;
AIServoPort(ROBOTIS, AX12) bus;
AIServoFrame Frames[3];
unsigned long playtime[3] = {500, 800, 300};
void setup() {
Servo1.attach(bus, 21); Servo2.attach(bus, 22); Servo3.attach(bus, 23);
Frames[0].positions[0] = 150; Frames[0].positions[1] = 150; Frames[0].positions[2] = 130;
Frames[1].positions[0] = 240; Frames[1].positions[1] = 145; Frames[1].positions[2] = 180;
Frames[2].positions[0] = 240; Frames[2].positions[1] = 160; Frames[2].positions[2] = 180;
Serial.println("Natural CUBIC");
}
void loop() {
aiservoBeginSplineMotion(NATURAL_CUBIC, Frames, playtime, 3);
for (int i=0; i<3; i++) {
Frames[i].playPositions(playtime[i]);
while(isAIServoMultiMoving() == true);
}
aiservoEndSplineMotion();
}參考
函式庫參考主頁面
86Duino 參考的文本是根據 知識共享署名-相同方式分享 3.0 許可證,部分文本是從 Arduino 參考 修改的。 參考中的代碼示例已發佈到公共領域。