AIServoFrame constructor

[AIServo86]

説明

Initializes the AIServoFrame class.

Syntax

AIServoFrame myframe
AIServoFrame myframe(filename)

Parameters

filename: The name of the file. When a filename is specified, the specified action frame file will be loaded during the initialization of the AIServoFrame class. If your 86Duino is not equipped with an SD card, or if the SD card does not contain the specified file, the loading will fail.

Example

#include <AIServo86.h>
 
AIServoPort(ROBOTIS, AX12) bus;
AIServo myservo1;
AIServo myservo2;
AIServo myservo3;
AIServoFrame myframe("frame.txt"); // Load the action frame with the file name frame.txt from the SD card
 
void setup()
{
   bus.begin(Serial1, 1000000);
 
   myservo1. attach(bus, 1);
   myservo1. attach(bus, 3);
   myservo1. attach(bus, 5);
   
   myframe. positions[0] = 150;
   myframe. positions[1] = 180;
   myframe. positions[2] = 200;
 
   myframe. setPositions();
   aiservoMultiRun();
}
 
void loop() {}

See also


Libraries Reference Home

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

コメントする

上部へスクロール