ServoFrame.load()

[Servo86]

説明

Load the action frame file saved by the save() function. (After loading, the user can get the action frame content in the positions[] array.)

構文

myframe.load(filename)

媒介変数

  • myframe: the object of ServoFrame type.
  • filename: the name of the action frame file. Note: This function will only look for the action frame file under the root directory of the SD card, if your 86Duino is not inserted into the SD card, or there is no specified file in the SD card, the loading will fail.

戻り値

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

#include <Servo86.h>
  
Servo myservo1;
Servo myservo2;
Servo myservo3;
ServoFrame myframe;
  
void setup()
{
   myservo1.attach(9);
   myservo2.attach(11);
   myservo3.attach(5);
 
   myframe.load("frm0.txt"); // Load the robot motion frame from the specified file
   myframe.playPositions(500, myservo1, myservo2, myservo3); // play this action frame for 500 ms
}
  
void loop() {}

参照


ライブラリリファレンスホーム

86Duinoリファレンスのテキストは、Arduinoリファレンスを改変したもので、Creative Commons Attribution-ShareAlike 3.0ライセンスに基づいてライセンスされています。リファレンス内のコードサンプルはパブリックドメインとして公開されています。

上部へスクロール