ESP8266 + NodeMCU自定义构建+ WS2812.Init()导致重置

时间:2017-06-17 20:56:28

标签: nodemcu

我正试图让一些ws2812灯工作。我正在使用

NodeMCU custom build by frightanic.com
    branch: 1.5.4.1-final
    commit: 1885a30bd99aec338479aaed77c992dfd97fa8e2
    SSL: false
    modules: adc,file,gpio,http,i2c,net,node,ow,rtctime,spi,tmr,uart,websocket,wifi,ws2812
 build  built on: 2017-05-11 11:48
 powered by Lua 5.1.4 on SDK 1.5.4.1(39cb9a32)

当我执行ws2812.init()时,电路板重置为:

> =ws2812.init()

 ets Jan  8 2013,rst cause:2, boot mode:(3,7)

load 0x40100000, len 24560, room 16 
tail 0
chksum 0xb4
load 0x3ffe8000, len 2296, room 8 
tail 0
chksum 0x09
load 0x3ffe88f8, len 136, room 8 
tail 0
chksum 0x9d
csum 0x9d

我可以调用ws2812.write并在输出引脚上看到一个信号,但是时间不正确并且指示灯不起作用。

我做错了什么?这是我的第一个ESP8266项目,所以我觉得有点无能为力。

感谢您的帮助。

1 个答案:

答案 0 :(得分:0)

这些ESP8266芯片在使用哪种引脚时非常挑剔。在启动过程中在引脚上施加电压,甚至只是连接传感器输出,都可能导致类似您提到的问题。尽量不要使用this帖子中也讨论过的GPIO 0、2或15。

GPIO标签与主板上的引脚标签不一定有相同之处。因此,请远离引脚D3,D4和D8。 enter image description here

此外,当您开始使用WiFi功能时,更多的引脚将变得不可用。如果没有适当的错误代码,这会导致非常奇怪的行为。因此,请注意这一点。我将尝试为您找出启用WiFi时仍可以使用的引脚。