2

I am trying out an Adafruit neopixel array with the ESP8266 and the nodeMCU firmware.

Using following custom build:

NodeMCU custom build by frightanic.com
    branch: master
    commit: c8037568571edb5c568c2f8231e4f8ce0683b883
    SSL: false
    modules: bmp085,file,gpio,i2c,net,node,tmr,uart,wifi,ws2812
build built on: 2016-05-24 13:48
powered by Lua 5.1.4 on SDK 1.4.0

When I call ws2812.init(), this is what I get in ESPlorer:

> ws2812.init();
stdin:1: attempt to call field 'init' (a nil value)
stack traceback:
    stdin:1: in main chunk

When calling ws2812.write(), I get this output:

> ws2812.write(string.char(255,0,0,255,0,0));
stdin:1: bad argument #1 to 'write' (number expected, got string)
stack traceback:
    [C]: in function 'write'
    stdin:1: in main chunk

It seems, the module ws2812 is there in any form, but has different signatures, as documented (https://nodemcu.readthedocs.io/en/dev/en/modules/ws2812/).

Any ideas? Thanks, Gerd

gre_gor
  • 6,669
  • 9
  • 47
  • 52

1 Answers1

2

You obviously built your firmware with http://nodemcu-build.com/ (disclaimer: it's my site). It allows you to select a NodeMCU firmware branch, currently master or dev.

The documentation link you posted is for the dev branch (/en/dev/en/modules/...). RTD automatically forwards you to the dev branch because our revised documentation is not yet in the master branch. If you care about that progress you might want to follow https://github.com/nodemcu/nodemcu-firmware/issues/1146.

So, just get a firmware from the dev branch and you're all set.

Marcel Stör
  • 22,695
  • 19
  • 92
  • 198