ServoFramePololu.load()

[Servo86]

Description

Load the action frame specified in the Maestro Control Center action frame file.

Syntax

myframe.load(filename, sequence_name, frame_name)

Parameters

  • myframe: the object of ServoFramePololu type.
  • filename: The name of the action frame file saved by Maestro Control Center. Note: This function will only look for the action frame file under the root directory of the SD card. If your 86Duino is not inserted into the SD card, or if there is no specified file in the SD card, the load will fail.
  • sequence_name: the name of the Sequence to which the action frame belongs (can be obtained by querying in Maestro Control Center).
  • frame_name: the name of the action frame (available in Maestro Control Center).

Returns

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

Example

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

See also


Libraries Reference Home

The text of the 86Duino reference is a modification of the Arduino reference and is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.

Leave a Comment

Scroll to Top