servoEndSplineMotion()

説明

この関数は、servoBeginSplineMotion() によって有効になる曲線補間機能を無効にします。この関数は、Coding 300 以降の 86Duino IDE でサポートされています。

文法

servoEndSplineMotion()

パラメータ

なし

ポストバック

なし

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

#include "Servo86.h"

Servo Servo1;

Servo Servo2;

Servo Servo3;

 

ServoFrame Frames[3];

unsigned long playtime[3] = {200, 500, 100};

void setup() {

  Servo1.attach(21); Servo2.attach(22); Servo3.attach(23);

  Frames[0].positions[0] = 1500; Frames[0].positions[1] = 1500; Frames[0].positions[2] = 1310;

  Frames[1].positions[0] = 2040; Frames[1].positions[1] = 1450; Frames[1].positions[2] = 1840;

  Frames[2].positions[0] = 2040; Frames[2].positions[1] = 1060; Frames[2].positions[2] = 1840;

  Frames[0].playPositions(playtime[0]);

  Serial.println("Natural CUBIC");

 

 

void loop() {

  servoBeginSplineMotion(NATURAL_CUBIC, Frames, playtime, 3);

  // 次の再生モーションには、曲線補間によるスムージング効果が適用されます

  for (int i=0; i<3; i++) {

    Frames[i].playPositions(playtime[i]);

    while(isServoMultiMoving() == true);

  >

  servoEndSplineMotion();  //曲線補間機能をオフにする

>

参照

- attach()
- ServoFrame
- positions[]
- playPositions()
- isServoMultiMoving()
- servoBeginSplineMotion()


 

ライブラリリファレンスページ

86Duinoリファレンスのテキストは、クリエイティブ・コモンズ 表示-継承 3.0 ライセンス に基づいてライセンスされています。リファレンス内のコードサンプルはパブリックドメインとして公開されています。