AIServoFrameRobotis constructor

[AIServo86]

説明

Initialize the AIServoFrameRobotis class.

AIServoFrameRobotis is inherited from the AIServoFrame class and you can call the function members inside the AIServoFrame class such as positions[], setPositions(), playPositions(), save() to set, save or play the Frame directly.

Syntax

AIServoFrameRobotis myframe
AIServoFrameRobotis myframe(filename, motionname, step)

Parameters

  • filename: The name of the .mtn file generated by the RoboPlus Motion editor. When a filename is specified, the specified file will be loaded during the initialization of the AIServoFrameRobotis class. Please note that currently only the root directory of the SD card is supported for downloading files. If your 86Duino does not have an SD card on it or if the SD card does not contain the specified file, loading will fail.
  • motionname: the name of the Motion you want to load into the .mtn file.
  • step: the Step number of the Motion you want to read.

Example

#include <AIServo86.h>
 
AIServoPort(ROBOTIS, AX12) bus;
AIServo myservo0;
AIServo myservo1;
AIServo myservo2;
AIServoFrameRobotis myframe("test.mtn", "abc", 1); // Read Step 1 of abc in file test.mtn
 
void setup()
{
   bus.begin(Serial1, 1000000);
   myservo0. attach(bus, 21);
   myservo1. attach(bus, 23);
   myservo2. attach(bus, 25);
   myframe.playPositions(myservo0, myservo1, myservo2); // play action
}
 
void loop() {}

See also


Libraries Reference Home

86Duino のリファレンスのテキストは Arduino レファレンス を編集したもので、 Creative Commons Attribution-ShareAlike 3.0 License下でライセンスされています。リファレンス内のコードサンプルはパブリックドメインとして公開されています。

コメントする

上部へスクロール