mySerial.begin(2400,SERIAL_8E1); 这个指令是错误的,求老铁告知正确命令
Arduino:1.8.1 (Windows 7), 开发板:"Arduino/Genuino Uno"
C:\Users\Administrator\Desktop\arduino\xunichuankou\xunichuankou.ino: In function 'void setup()':
xunichuankou:15: error: no matching function for call to 'SoftwareSerial::begin(int, int)'
mySerial.begin(2400,SERIAL_8E1);
^
C:\Users\Administrator\Desktop\arduino\xunichuankou\xunichuankou.ino:15:35: note: candidate is:
In file included from C:\Users\Administrator\Desktop\arduino\xunichuankou\xunichuankou.ino:5:0:
D:\arduino-1.8.1\hardware\arduino\avr\libraries\SoftwareSerial\src/SoftwareSerial.h:94:8: note: void SoftwareSerial::begin(long int)
void begin(long speed);
^
D:\arduino-1.8.1\hardware\arduino\avr\libraries\SoftwareSerial\src/SoftwareSerial.h:94:8: note: candidate expects 1 argument, 2 provided
exit status 1
no matching function for call to 'SoftwareSerial::begin(int, int)'
在文件 -> 首选项开启
“编译过程中显示详细输出”选项
这份报告会包含更多信息。
|