arduino 串口发送和接受的数据不一样 50
程序如下:voidsetup(){//putyoursetupcodehere,torunonce:Serial.begin(9600);}longt=0;voidloo...
程序如下:
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
}
long t = 0;
void loop() {
// put your main code here, to run repeatedly:
if( Serial.available())
{ t = Serial.read();};
Serial.println(t);
delay(2000);
}
实际使用arduino的串口监视助手发送100 返回48 展开
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
}
long t = 0;
void loop() {
// put your main code here, to run repeatedly:
if( Serial.available())
{ t = Serial.read();};
Serial.println(t);
delay(2000);
}
实际使用arduino的串口监视助手发送100 返回48 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询