(SKU:SER0006)DF9GMS 180° 微型舵机
来自DFRobot Product Wiki
目录 |
简介
由DFRobot 出品的DF9GMS 180°微型舵机,该舵机采用高强度ABS透明外壳配以内部高精度尼龙齿轮组,加上精准的控制电路、高档轻量化空心杯电机使该微型舵机的重量只有9克,而输出力矩达到了惊人的1.6kg*cm。
技术规格
工作电压:4.8V
转矩:1.6kg/cm(4.8V)
速度:0.14秒/60度(4.8V)
使用温度:-30~+60摄氏度
死区宽度:5微秒
外形尺寸:23x12.2x29mm
重量:9g
连接图
- 硬件
- 1 x Arduino UNO控制板
- 1 x DF9GMS 180° 微型舵机
- 若干 杜邦线
示例代码
- 软件
- Arduino IDE (根据能够使用的Arduino版本来选择,不要盲目追求最新版本), 点击下载Arduino IDE
/******************************* #include <Servo.h> Servo myservo; // create servo object to control a servo // twelve servo objects can be created on most boards int pos = 0; // variable to store the servo position void setup() { myservo.attach(9); // attaches the servo on pin 9 to the servo object } void loop() { for (pos = 0; pos <= 180; pos += 1) { // goes from 0 degrees to 180 degrees // in steps of 1 degree myservo.write(pos); // tell servo to go to position in variable 'pos' delay(15); // waits 15ms for the servo to reach the position } for (pos = 180; pos >= 0; pos -= 1) { // goes from 180 degrees to 0 degrees myservo.write(pos); // tell servo to go to position in variable 'pos' delay(15); // waits 15ms for the servo to reach the position } }
Mind+(基于Scratch3.0)图形化编程
1、下载及安装软件。下载地址:http://www.mindplus.cc 详细教程:Mind+基础wiki教程-软件下载安装
2、切换到“上传模式”。 详细教程:Mind+基础wiki教程-上传模式编程流程
3、“扩展”中选择“主控板”中的“Arduino Uno”,“执行器”中加载“舵机模块”。 详细教程:Mind+基础wiki教程-加载扩展库流程
4、进行编程,程序如下图:
5、菜单“连接设备”,“上传到设备”
结果
代码上传完成后,舵机从0度到180度再到0度循环转动。
常见问题
还没有客户对此产品有任何问题,欢迎通过qq或者论坛联系我们!