用Keil5编写STM32单片机,出现错误,应该怎么改?
主函数intmain(){while(1){DHT11_Read_Data(&wd,&sd);//¶ÁÈ¡ÎÂ...
主函数
int main()
{
while(1)
{
DHT11_Read_Data(&wd,&sd);//¶ÁÈ¡ÎÂʪ¶ÈÖµ
printf ("µ±Ç°»·¾³Î¶È: %d C\r\n",wd);
printf ("µ±Ç°»·¾³Êª¶È: %d %\r\n",sd);
delay_ms(10);
delay_ms(10);
}
}
错误:User\main.c(9): error: #20: identifier "wd" is undefined
DHT11_Read_Data(&wd,&sd);//读取温湿度值
User\main.c(9): error: #20: identifier "sd" is undefined
DHT11_Read_Data(&wd,&sd);//读取温湿度值 展开
int main()
{
while(1)
{
DHT11_Read_Data(&wd,&sd);//¶ÁÈ¡ÎÂʪ¶ÈÖµ
printf ("µ±Ç°»·¾³Î¶È: %d C\r\n",wd);
printf ("µ±Ç°»·¾³Êª¶È: %d %\r\n",sd);
delay_ms(10);
delay_ms(10);
}
}
错误:User\main.c(9): error: #20: identifier "wd" is undefined
DHT11_Read_Data(&wd,&sd);//读取温湿度值
User\main.c(9): error: #20: identifier "sd" is undefined
DHT11_Read_Data(&wd,&sd);//读取温湿度值 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询