save()
描述
将 positions[] 阵列的内容储存至指定的动作帧档案。
语法
myframe.save(filename)
参数
myframe:ServoFrame 型别的物件。
filename:动作帧档案的名称。注意:档案会储存至 SD 卡的根目录下,假如您的 86Duino 没有插入 SD 卡,则储存会失败。
回传
true:档案储存成功。
false:档案储存失败。
范例
#include <Servo86.h>
ServoFrame myframe;
void setup()
{
myframe.positions[0] = 1800; // 设定动作帧内容
myframe.positions[1] = 1300;
myframe.positions[2] = 2000;
myframe.save("frm0.txt"); // 将动作帧储存为 SD 卡根目录下的 "frm0.txt"
}
void loop() {}
See also
The text of the 86Duino reference is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.
