save()

描述

儲存目前的 Frame 至指定檔案。

語法


aiservoframerobotis.save(filename)

參數

aiservoframerobotisAIServoFrameRobotis 型別的變數。

filename:86Duino Frame 檔案名稱。請注意,檔案目前只支援儲存至 SD 卡根目錄下,假如您的 86Duino 上面沒有 SD 卡,儲存則會失敗。

回傳

true:檔案儲存成功。
false:檔案儲存失敗。

範例

#include <AIServo86.h> 

AIServoFrameRobotis myframe;
 
void setup() 
{ 
  myframe.positions[0] = 180; // 設定 Frame 內容
  myframe.positions[1] = 130;
  myframe.positions[2] = 200;
  myframe.save("frm0.txt"); // 將動作幀儲存至 SD 卡根目錄下的 "frm0.txt"
}
 
void loop() {} 

See also

positions[]
setPostions()
load()


函式庫參考主頁面

The text of the 86Duino reference is a modification of the Arduino reference, and is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.