標(biāo)題: arduino舵機(jī)控制程序 [打印本頁]

作者: Linnnxw    時(shí)間: 2019-5-11 17:10
標(biāo)題: arduino舵機(jī)控制程序
控制舵機(jī)轉(zhuǎn)動(dòng)角度程序
修改其中數(shù)據(jù)就可

#include <SoftwareSerial.h>    //包含軟串口頭文件,硬串口通信文件庫系統(tǒng)自帶   
/*******************************一些宏定義****************************************/
SoftwareSerial mySerial(A6,A7); //創(chuàng)建一個(gè)軟串口的類,模擬引腳4,5分別代表 RX, TX引腳 AR多功能板

void setup() {
     mySerial.begin(115200);         //設(shè)置軟串口波特率
  // put your setup code here, to run once:

}

void loop() {
   mySerial.print("#000P2000T1000!");
delay(10000);
  mySerial.print("#000P1500T1000!");
  delay(1000);
  // put your main code here, to run repeatedly:

}






歡迎光臨 (http://www.torrancerestoration.com/bbs/) Powered by Discuz! X3.1