循迹小车Arduino程序.docxVIP

  • 30
  • 0
  • 约1.97千字
  • 约 5页
  • 2020-09-06 发布于天津
  • 举报
//循迹小车 Arduino 程序: // R 是右(right),L 是左(left) int MotorRight1=14; //A0 IN1 int MotorRight2=15; //A1 IN2 int MotorLeft1=16; //A2 IN3 int MotorLeft2=17; //A3 IN4 int MotorRPWM=5; //PWM 5 int MotorLPWM=3; //PWM 3 const int SensorLeft = 2; // const int SensorRight = 6; // int SL; // 左感测器状熊 int SR; // 右感测器状熊 小车对着自己看时 分的左右 左感测器审俞入 右感测器审俞入 void setup() ( Serial.begin(9600); pinMode(MotorRight1, OUTPUT); // 胎P 位 14 (PWM) pinMode(MotorRight2, OUTPUT); // 胎P 位 15 (PWM) pinMode(MotorLeft1, OUTPUT); // 胎P 位 16 (PWM) pinMode(MotorLeft2, OUTPUT); // 胎P 位 17 (PWM) pinMode(MotorLPWM, OUTPUT); // 胎P位 3 (PWM) p

文档评论(0)

1亿VIP精品文档

相关文档