save()
描述
将 positions[] 阵列的内容储存为可被 ServoFrame 载入的动作帧档案。
语法
myframe.save(filename)
参数
myframe
:ServoFrameKondo
型别的物件。
filename
:动作帧档案的名称。注意:档案会储存至 SD 卡的根目录下,假如您的 86Duino 没有插入 SD 卡,则储存会失败。
回传
true
:档案储存成功。
false
:档案储存失败。
范例
#include <Servo86.h> ServoFrameKondo myframe; void setup() { myframe.positions[0] = 1800; // 设定 Frame 内容 myframe.positions[1] = 1300; myframe.positions[2] = 2000; myframe.save("frm0.txt"); // 将动作帧储存至 SD 卡根目录下的 "frm0.txt" } void loop() {}
See also
- positions[]
- load()
- setPostions()
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.