include引入串行通讯库定义小车的两个电机constintmotorLeftA9;constintmotorLeftB10;constintmotorRightA5;constintmotorRightB6;SoftwareSerialserial(7,8);创建软件串口,连接到电脑的某个端口voidsetup(){putyoursetupcodehere,torunonce:Serial.begin(9600);初始化串口通信pinMode(motorLeftA,OUTPUT);pinMode(motorLeftB,OUTPUT);pinMode(motorRightA,OUTPUT);pinMode(motorRightB,OUTPUT);serial.begin(9600);开启串口通...
2024-08-23 13:52:43 4163浏览 0点赞 0回复 0收藏