1. 运动功能说明
连杆滑块伸缩模组的主要运动方式为舵机带动滑块沿着光轴平行方向做伸缩运动。
 
2. 结构说明
本模组主要是由舵机、滑块、光轴、连杆等组成。

3. 电子硬件
在这个示例中,我们采用了以下硬件,请大家参考:
| 主控板 | Basra主控板(兼容Arduino Uno) | 
| 扩展板 | Bigfish2.1扩展板 | 
| 电池 | 7.4V锂电池 | 
电路连接:舵机连接在Bigfish扩展板的D4端口。

4. 运动功能实现
编程环境:Arduino 1.8.19
将参考例程(sketch_apr25a.ino)下载到主控板,实验效果可参考演示视频。
/*------------------------------------------------------------------------------------
  版权说明:Copyright 2023 Robottime(Beijing) Technology Co., Ltd. All Rights Reserved.
           Distributed under MIT license.See file LICENSE for detail or copy at
           https://opensource.org/licenses/MIT
           by 机器谱 2023-05-15 https://www.robotway.com/
  ------------------------------*/
#include <Servo.h>
Servo servo_pin_4;
void setup()
{
  servo_pin_4.attach(4);
}
void loop()
{
  servo_pin_4.write( 90 );
  //delay( 500 );
  servo_pin_4.write( 50 );
  delay( 500 );
  servo_pin_4.write( 90 );
// delay( 500 );
  servo_pin_4.write( 130 );
  delay( 500 );
}
程序源代码及样机3D文件资料内容详见 连杆滑块伸缩模组-概述



















