[Servo86]
説明
In the .ini action settings file generated by RobovieMaker2, load the specified servo offset fine tuning values.
構文
myoffset.load(filename, offset_name)
媒介変数
myoffset
: The ServoOffsetVstone type of object.filename
: The name of the .ini action profile generated by RobovieMaker2. Note: This function only looks for the specified file in the root directory of the SD card. If your 86Duino does not have an SD card inserted, or if the SD card does not contain the specified file, loading will fail.offset_name
: The name of the Offset in the RobovieMaker2 action profile (available in RobovieMaker2).
戻り値
- true: The file was loaded successfully.
- false: File loading failed.
例
#include <Servo86.h> Servo myservo0; Servo myservo1; Servo myservo2; ServoOffsetVstone myoffset; void setup() { myservo0.attach(9); myservo1.attach(11); myservo2.attach(5); // Load the offset trim value named Offset 0 from the vstone_offset.ini profile in the SD card myoffset.load("vstone_offset.ini", "Offset 0"); myoffset.setOffsets(myservo0, myservo1, myservo2); // Set the offset fine-tuning value of each servo } void loop() {}
See also
Libraries Reference Home
86Duino のリファレンスのテキストは Arduino レファレンス を編集したもので、 Creative Commons Attribution-ShareAlike 3.0 License下でライセンスされています。リファレンス内のコードサンプルはパブリックドメインとして公開されています。