ServoFrameKondo.save()

[Servo86]

描述

Saves the contents of the positions[] array as an action frame file that can be loaded by the ServoFrame.

語法

myframe.save(filename)

參數

  • myframe: the object of ServoFrameKondo type.
  • filename: the name of the action frame file. Note: The file will be saved to the root directory of the SD card. If your 86Duino is not inserted into the SD card, the storage will fail.

回傳

  • true: The file was saved successfully.
  • false: File saving failed.

範例

#include <Servo86.h>
 
ServoFrameKondo myframe;
  
void setup()
{
   myframe.positions[0] = 1800; // set the frame content
   myframe.positions[1] = 1300;
   myframe.positions[2] = 2000;
 
   myframe.save("frm0.txt"); // save the motion frame to "frm0.txt" in the root directory of the SD card
}
  
void loop() {}

參考


函式庫參考主頁面

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

發表評論

上部へスクロール