Save the offsets (i.e., offsets[] array) of all AIServo’s on the robot to the specified file.



servooffset: Variable of type AIServoOffset.

filename: the name of the file. Please note that the file is currently only supported to be saved to the root directory of the SD card. If you do not have an SD card on your 86Duino, saving will fail.


  • true: File was saved successfully.
  • false: File saving failed.


#include <AIServo86.h>
AIServoPort(ROBOTIS, AX12) bus;
AIServo myservo0;
AIServo myservo1;
AIServo myservo2;
AIServoOffset myoffset;
void setup()
   bus.begin(Serial1, 1000000);
   myservo0. attach(bus, 9);
   myservo1. attach(bus, 11);
   myservo2. attach(bus, 5);
   myoffset.offsets[0] = -20; // Set Offset content
   myoffset.offsets[1] = 5;
   myoffset.offsets[2] = -10;"offset0.txt"); // Save the motion fine-tuning value to "offset0.txt" in the root directory of SD card
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

Your email address will not be published. Required fields are marked *

Scroll to Top