[Servo86]
描述
Save the contents of the offsets[] array as a servo offset trim file that can be loaded by the ServoFrame.
語法
myoffset.save(filename)
參數
myoffset
: the object of ServoOffsetKondo type.filename
: The specified file name. 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> ServoOffsetKondo myoffset; void setup() { myoffset.offsets[0] = -200; // Set the servo offset fine-tuning value myoffset.offsets[1] = 50; myoffset.offsets[2] = -100; myoffset.save("offsets.txt"); // save the offset fine-tuning value to "offsets.txt" in the root directory of SD card } void loop() {}
參考
函式庫參考主頁面
86Duino 參考的文本是根據 Creative Commons Attribution-ShareAlike 3.0 License,部分文本是從 the Arduino reference 修改的。 參考中的代碼示例已發佈到公共領域。