load()

Description

Loads the specified servo offset fine-tuning values from the .ini action configuration file generated by RobovieMaker2.

Grammar

myoffset.load(filename, offset_name)

Parameters

myoffset: Object of ServoOffsetVstone type.

filename: The name of the .ini action configuration file generated by RobovieMaker2. Note: This function only searches the root directory of the SD card for the specified file. If your 86Duino is not inserted into the SD card, or if the specified file is not present on the SD card, the file will fail to load.

offset_name: The name of the offset value in the RobovieMaker2 action configuration file (available in RobovieMaker2).

Return

true: The file was loaded successfully.

false: The file failed to load.

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;

ServoOffsetVstone myoffset;

 

void setup()

{

  myservo0.attach(9);

  myservo1.attach(11);

  myservo2.attach(5);

 

  // Load the offset fine-tuning value named Offset 0 from the vstone_offset.ini configuration file on the SD card

  myoffset.load("vstone_offset.ini", "Offset 0");

 

  myoffset.setOffsets(myservo0, myservo1, myservo2); // Set the offset fine-tuning value of each servo

}

 

void loop() {}

See also

- offsets[]
- save()


Function library reference main page

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.