WeMos(ESP8266)功能同时 [英] WeMos (ESP8266) Function While

查看:380
本文介绍了WeMos(ESP8266)功能同时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的功能有问题。当我评论此行时,监视器序列中没有错误,但是,当我使用所有功能时,在监视器序列中显示此错误。

My function while have a problem. When I comment this line doesn't have error in monitor serial, but, when I use all function show this error on monitor serial.

void windvelocity(){
speedwind = 0;
counter = 0;  
attachInterrupt(0, addcount, RISING);
unsigned long millis();       
long startTime = millis();
while(millis() < startTime + period) {
}
}

当我将此功能上传到wemos时,串行监视器将打印此

When I make upload this function to wemos, the Serial Monitor print this

ets Jan  8 2013,rst cause:2, boot mode:(3,6)
load 0x4010f000, len 1384, room 16 
tail 8
chksum 0x2d
csum 0x2d
v09f0c112
~ld


推荐答案

这不是错误消息,而是标准启动消息。为了正确回答您的问题,我们需要知道确切使用的板卡,如何连接零件(什么引脚,电压等),什么零件以及完整的代码。

This ain't a error message but a standard boot message. To properly answer your question we would need to know what board exactly you use, how you connected your parts (what pins, voltage, etc), what parts and of course the full code.

请记住,esp8266的分线板(例如节点mcu)有时会造成混乱。因此,请始终仔细检查要使用的引脚以及在代码中声明的引脚。

Please remember that the breakout boards for the esp8266 (for example the node mcu) are confusing sometimes. So always double check what pins you want to use and what pins you declared in your code.

例如,如果您想拥有 D0 作为某物(可能是LED)的输出,您必须将其声明为输出。

For example, if you want to have D0 as the output for something, probably a LED, you will have to declare it as output.

pinMode(16, Output);           // set pin to output

或者在要将其用作输入(例如用于传感器)时使用

Or when wanting to use it as input (for example for sensors) use

pinMode(16, Input);            // set pin to input

为什么要使用 16 您问> D0 ?看看有关如何将引脚称为输入或输出的更多信息。在那里,您可以看到要使用的引脚。

Why 16 when wanting to use D0 you ask? Take a look at this for more information on how to refer to the pins as input or output . There you can see what pins to use.

这篇关于WeMos(ESP8266)功能同时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆