ServoFrameKondo.load()

[Servo86]

描述

Load the action frame specified in the .rcb action file of HTH3 (HeartToHeart 3).

語法

myframe.load(filename, frame_name)

參數

  • myframe: the object of ServoFrameKondo type.
  • filename: The name of the .rcb action file saved by HTH3. Note: This function will only look for action files under the root directory of the SD card. If your 86Duino is not inserted into the SD card, or if there is no specified file on the SD card, loading will fail.
  • frame_name: The name of the action frame (can be found in HTH3).

回傳

  • true: The file was loaded successfully.
  • false: File loading failed.

範例

#include <Servo86.h>
  
Servo myservo1;
Servo myservo2;
Servo myservo3;
ServoFrameKondo myframe;
 
void setup()
{
   myservo1.attach(9);
   myservo2.attach(11);
   myservo3.attach(5);
 
   // Load "Frame0" in kondo.rcb action file
   myframe.load("kondo.rcb", "Frame0");
 
   myframe.playPositions(myservo1, myservo2, myservo3); // play action frames
}
  
void loop() {}

參考


函式庫參考主頁面

86Duino 參考的文本是根據 Creative Commons Attribution-ShareAlike 3.0 License,部分文本是從 the Arduino reference 修改的。 參考中的代碼示例已發佈到公共領域。

發表評論

上部へスクロール