ServoFrameVstone constructor

Description

Initializes the ServoFrameVstone class. ServoFrameVstone inherits from the ServoFrame class and can load robot motion frames created using the RobovieMaker2 motion editor.

Syntax

ServoFrameVstone myframe
ServoFrameVstone myframe(filename, frame_name)

Parameters

filename: The name of the .txt action file saved by RobovieMaker2.

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

If both parameters are entered, ServoFrameVstone will automatically load the specified action frame in the file as the initial action frame when the class is initialized. Please note that you must place the file in the root directory of the SD card. If your 86Duino is not installed on the SD card, or if the SD card does not contain the action file, the file loading will fail.

Example

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

#include <Servo86.h>

 

Servo myservo0;

Servo myservo1;

Servo myservo2;

 

//Load "Frame 0" in the vstone_motion.txt action file from the SD card

ServoFrameVstone myframe("vstone_motion.txt", "Frame 0");

 

void setup()

{

  myservo0.attach(21);

  myservo1.attach(23);

  myservo2.attach(25);

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

}

 

void loop() {}

See also

– load()
– setPositions()


Library Reference Home

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