Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
345 views
in Technique[技术] by (71.8m points)

WeMos (ESP8266) Function While

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) {
}
}

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
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.

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.

nodemcu esp8266 pinout

wemos d1 mini esp8266 pinout

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

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...