load()

Description

Loads the specified action frame from the .txt action file in RobovieMaker2.

Syntax

myframe.load(filename, frame_name)

Parameters

myframe: Object of type ServoFrameVstone.

filename: The name of the .txt action file saved by RobovieMaker2. Note: This function only searches the root directory of the SD card for action files. If there is no SD card inserted in your 86Duino, or if the specified file is not on the SD card, loading will fail.

frame_name: The name of the action frame (can be found in RobovieMaker2).

Return

true: File loaded successfully. False: File loaded unsuccessfully.

Example

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

#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 the vstone.txt action file

  myframe.load("vstone.txt", "Frame 0");

 

  myframe.playPositions(myservo0, myservo1, myservo2); // Play action frame

}

  

void loop() {}

See also

- positions[]
- save()
- setPositions()


Library Reference Home Page

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.