ServoOffsetVstone.load()

[Servo86]

Description

In the .ini action settings file generated by RobovieMaker2, load the specified servo offset fine tuning values.

Syntax

myoffset.load(filename, offset_name)

Parameters

  • myoffset: The ServoOffsetVstone type of object.
  • filename: The name of the .ini action profile generated by RobovieMaker2. Note: This function only looks for the specified file in the root directory of the SD card. If your 86Duino does not have an SD card inserted, or if the SD card does not contain the specified file, loading will fail.
  • offset_name: The name of the Offset in the RobovieMaker2 action profile (available in RobovieMaker2).

Returns

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

Example

#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 trim value named Offset 0 from the vstone_offset.ini profile in 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


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