Arduino双舵机串口控制源代码

#include  
const unsigned int MOTOR_PIN1 = 9;
const unsigned int MOTOR_PIN2 = 10;
const unsigned int MOTOR_DELAY = 15;
const unsigned int SERIAL_DELAY = 5;
const unsigned int BAUD_RATE = 9600;
int yaw=92;
int pitch=97;
int track_delay=0;
int yaw_last,pitch_last;//control signal for actuators
Servo servo_1,servo_2; // 

使用方法:打开Arduino IDE自带串口监视器,设置末位添加newline,在命令行中发送“角度1+角度2”控制命令例如90+83

你可能感兴趣的:(Arduino,Arduino,servo,control)