基础教程04舵机和电机使用.pptxVIP

  • 37
  • 0
  • 约1.59千字
  • 约 21页
  • 2021-04-16 发布于北京
  • 举报
——舵机和电机控制;舵机控制;舵机 servo;控制器上有四个舵机端口,左边的0 1 ,右边的 2 3. 舵机的线有三根: (S) 橙色 (信号) (+) 红色 (电源) (?) 棕色 (地线) wire;使用舵机调试面板;舵机控制函数; 基础任务: 编写程序控制舵机臂的位置从200到1800,每次增加100 在程序开始之前启用舵机,在程序结束前关闭舵机 伪代码 注释 Set counter to 200. // 1. Set counter to 200 Set servo position to counter. // 2. Set servo position to counter Enable servos. // 3. Enable servos. Loop: Is counter 1800? // 4. Loop: Is counter 1800? Wait for 100 milliseconds. // 4.1. Wait for 100 milliseconds. Add 100 to counter. // 4.2. Add 100 to servo position. Set servo position to counter. // 4.3 Set servo position to counter. D

文档评论(0)

1亿VIP精品文档

相关文档