下面这段Arduino程序有什么问题?
StringreceivedMessage="04.100";StringcurrentOutputNumber;StringcurrentValueNumber;cur...
String receivedMessage = "04.100";
String currentOutputNumber;
String currentValueNumber;
currentOutputNumber= receivedMessage.substring(0,2);///这是出错的行
void setup()
{
Serial.begin(9600);
while(!Serial){
};
}
void loop()
{
currentValueNumber = receivedMessage.substring(3);
Serial.println(currentOutputNumber);
Serial.println(currentValueNumber);
while(1){
};
}
;;===============================================================================
This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.
Arduino: 1.0.6 (Windows XP), Board: "Arduino Uno"
sketch_nov01a:4: error: expected constructor, destructor, or type conversion before '=' token 展开
String currentOutputNumber;
String currentValueNumber;
currentOutputNumber= receivedMessage.substring(0,2);///这是出错的行
void setup()
{
Serial.begin(9600);
while(!Serial){
};
}
void loop()
{
currentValueNumber = receivedMessage.substring(3);
Serial.println(currentOutputNumber);
Serial.println(currentValueNumber);
while(1){
};
}
;;===============================================================================
This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.
Arduino: 1.0.6 (Windows XP), Board: "Arduino Uno"
sketch_nov01a:4: error: expected constructor, destructor, or type conversion before '=' token 展开
科博尔
2024-10-31 广告
2024-10-31 广告
QT400-18是一种球墨铸铁材料,QT代表“球铁”,400表示其抗拉强度为400MPa,18则表示延伸率为18%。该材料属于铁素体型球墨铸铁,具有良好的韧性和塑性,能够承受高冲击振动及扭转等动、静载荷,特别在低温工作条件下具有较好的冲击性...
点击进入详情页
本回答由科博尔提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询