ServoFrame 建构子
描述
初始化 ServoFrame
类别。
语法
ServoFrame myframe
ServoFrame myframe(filename)
参数
filename
:动作帧档案名称。如果有输入档案名称,则 ServoFrame
在初始化类别时,会自动载入该档案内容做为初始动作帧。请注意,您必须将动作帧档案放在 SD 卡根目录下;假如您的 86Duino 没有置入 SD 卡,或者 SD 卡内不包含动作帧档案,则档案载入会失败。
范例
#include <Servo86.h> Servo myservo1; Servo myservo2; Servo myservo3; ServoFrame myframe("frame.txt"); // 从 SD 卡中载入档案名称为 frame.txt 的动作帧 void setup() { myservo1.attach(21); myservo2.attach(23); myservo3.attach(25); myframe.setPositions(); servoMultiRun(); } void loop() {}
See also
- positions[]
- setPositions()
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.