[AIServo86]
説明
Save the user-defined offset of the robot. The unit is degrees.
The first element of the array represents the Servo offset of the first channel, the second element represents the AIServo offset of the second channel, and so on.
Up to 64 channels of AIServo offsets can be specified.
構文
servooffset.offsets[channel]
媒介変数
servooffset
: Variable of AIServoOffset type.channel
: Range: 0 ~ 63, its value represents the AIServo of the nth channel; please see the example below.
戻り値
なし
例
#include <AIServo86.h> AIServoPort(ROBOTIS, AX12) bus; AIServo myservo0; AIServo myservo1; AIServo myservo2; AIServoOffset myoffset; void setup() { bus.begin(Serial1, 1000000); myservo0. attach(bus, 9); myservo1. attach(bus, 11); myservo2. attach(bus, 5); myoffset.offsets[0] = -20; // Set Offset content myoffset.offsets[1] = 5; myoffset.offsets[2] = -10; // assign the value of Offset to the servo (the value of offsets[0] is assigned to myservo0 // , the value of offsets[1] is assigned to myservo1, and the value of offsets[2] is assigned to myservo2) myoffset.setOffsets(myservo0, myservo1, myservo2); } void loop() {}
See also
Libraries Reference Home
86Duino のリファレンスのテキストは Arduino レファレンス を編集したもので、 Creative Commons Attribution-ShareAlike 3.0 License下でライセンスされています。リファレンス内のコードサンプルはパブリックドメインとして公開されています。