ServoOffsetInno.setOffsets()

[Servo86]

Description

Assign the list of Offset offsets to each servo.

Syntax

servooffsetinno.setOffsets()
servooffsetinno.setOffsets(servo1)
servooffsetinno.setOffsets(servo1, servo2)
servooffsetinno.setOffsets(servo1, servo2, ... , servo45)

Parameters

  • servooffsetinno: Variable of ServoOffsetInno type.
  • servo1 ~ servo45: Variables of Servo type.

Returns

None.

Example

#include <Servo86.h>
 
Servo myservo0;
Servo myservo1;
Servo myservo2;
ServoOffsetInno myoffset;
 
void setup()
{
   myservo0.attach(9); myservo1.attach(11); myservo2.attach(5);
   myoffset.offsets[0] = -200; // set Offset content
   myoffset.offsets[1] = 50;
   myoffset.offsets[2] = -100;
   // assign the Offset value to the servo (offsets[0] assigns the value to myservo0
   // , the value of offsets[1] is assigned to myservo1, and the value of offsets[2] is assigned to myservo2)
   myoffset.setOffsets(myservo0, myservo1, myservo2);
}
 
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