代码之家  ›  专栏  ›  技术社区  ›  MSilveira

WeMos(ESP8266)功能

  •  -2
  • MSilveira  · 技术社区  · 7 年前

    我的功能有问题。当我注释时,这一行在监视器序列中没有错误,但是,当我使用all函数时,在监视器序列中显示此错误。

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

    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
    
    2 回复  |  直到 7 年前
        1
  •  0
  •   x3l51    7 年前

    这不是错误消息,而是标准引导消息。为了正确回答您的问题,我们需要知道您使用的是什么板,您如何连接部件(什么引脚、电压等),什么部件,当然还有完整的代码。

    nodemcu esp8266 pinout

    wemos d1 mini esp8266 pinout

    例如,如果你想 D0 作为某些东西的输出,可能是一个LED,您必须将其声明为输出。

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

    或者当想要将其用作输入(例如传感器)时,使用

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

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

        2
  •  0
  •   BMelis    7 年前