save()

Description

Saves the contents of the positions[] array as a motion frame file that can be loaded by ServoFrame.

Syntax

servoframevstone.save(filename)

Parameters

myframe: An object of type ServoFrameVstone.

filename: The name of the motion frame file. Note: The file will be saved to the root directory of the SD card. If there is no SD card inserted in your 86Duino, the save will fail.

Return

True: The file was saved successfully.
False: The file was saved unsuccessfully.

Example

1

2

3

4

5

6

7

8

9

10

11

12

13

14

#include <Servo86.h>

 

ServoFrameVstone myframe;

  

void setup()

{

  myframe.positions[0] = 1800; //Set Frame content

  myframe.positions[1] = 1300;

  myframe.positions[2] = 2000;

 

  myframe.save("frm0.txt"); // Save the action frame to "frm0.txt" in the root directory of the SD card.

}

  

void loop() {}

See also

- positions[]
- load()
- 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.