サイト内検索

検索

Shares

Table of Content

ServoFrameVstone.load()

[Servo86]

説明

Load the action frames specified in RobovieMaker2‘s .txt action file.

構文

myframe.load(filename, frame_name)

媒介変数

  • myframe: ServoFrameVstone type object.
  • filename: The name of the .txt action file saved by RobovieMaker2. Note: This function only looks for action files under the root directory of the SD card. If your 86Duino does not have an SD card inserted, or if there is no file specified on the SD card, loading will fail.
  • frame_name: The name of the action frame (can be found in RobovieMaker2).

戻り値

  • true: The file was loaded successfully.
  • false: File loading failed.

#include <Servo86.h>
  
Servo myservo0;
Servo myservo1;
Servo myservo2;
ServoFrameVstone myframe;
 
void setup()
{
   myservo0.attach(9);
   myservo1.attach(11);
   myservo2.attach(5);
 
   // Load "Frame 0" in vstone.txt action file
   myframe.load("vstone.txt", "Frame 0");
 
   myframe.playPositions(myservo0, myservo1, myservo2); // play action frames
}
  
void loop() {}

See also


Libraries Reference Home

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

上部へスクロール