手机号登录
手机号重置密码
只需一步,快速开始
#include <Servo.h> Servo myservo; // 定义舵机变量 void csb(int pos) { myservo.write(pos); delay(250); //舵机动作时间 } void setup() { Serial.begin(9600); myservo.attach(10); //定义舵机接口数字接口13 csb(100); //舵机带动超声波传感器至正位 } void loop() { csb(20); //舵机带动超声波传感器至正位 csb(160); //舵机带动超声波传感器至正位 }
使用道具 举报
本版积分规则 发表回复 回帖后跳转到最后一页
Archiver|联系我们|极客工坊
GMT+8, 2026-6-8 04:31 , Processed in 0.037087 second(s), 18 queries .
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.