[AIservo86]
Description
Disables the curve interpolation function enabled by aiservoBeginSplineMotion(). This feature is supported from Coding 315 onwards.
Syntax
aiservoEndSplineMotion();
Parameters
None.
Returns
None.
Example
#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();
}See also
Libraries Reference Home
The text of the 86Duino reference is a modification of the Arduino reference and is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.