AIServoFrameRobotis.load()

[AIServo86]

説明

Load the .mtn Frame file generated by RoboPlus Motion Editor.

Syntax

aiservoframerobotis.load(filename, motionname, step)

Parameters

  • aiservoframerobotis: Variant of the AIServoFrameRobotis type.
  • filename: The name of the .mtn file generated by the RoboPlus Motion editor. Please note that currently only downloading files from the root of the SD card is supported. 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.
  • framename: the Step number of the Motion you want to read.

Returns

  • true: File loading successfully.
  • false: File loading failed.

Example

#include <AIServo86.h>
  
AIServoPort(ROBOTIS, AX12) bus;
AIServo myservo0;
AIServo myservo1;
AIServo myservo2;
AIServoFrameRobotis myframe;
 
void setup()
{
   bus.begin(Serial1, 1000000);
   myservo0. attach(bus, 9);
   myservo1. attach(bus, 11);
   myservo2. attach(bus, 5);
   // Read Frame 0 of Sequence 0 in the Pololu Frame file
   myframe.load("test.mtn", "abc", 1);
   myframe.playPositions(myservo0, myservo1, myservo2); // play action
}
  
void loop() {}

See also


Libraries Reference Home

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

コメントする

上部へスクロール