AIServoFrame.save()

[AIServo86]

描述

Save the user-defined robot action frames (i.e. positions[] array) to the specified file.

語法

servoframe.save(filename)

參數

  • servoFrame: Variable of the AIServoFrame type.
  • filename: the name of the file. Please note that the file can only be saved to the root directory of the SD card. If you do not have an SD card in your 86Duino, saving will fail.

回傳

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

範例

#include <AIServo86.h>
 
AIServoPort(ROBOTIS, AX12) bus;
AIServoFrame myframe;
  
void setup()
{
   bus.begin(Serial1, 1000000);
   myframe.positions[0] = 180; // set Frame content
   myframe. positions[1] = 130;
   myframe. positions[2] = 200;
   myframe.save("frm0.txt"); // save the action frame to "frm0.txt" in the root directory of SD card
}
  
void loop() {}

參考


函式庫參考主頁面

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

發表評論

上部へスクロール