javieryanez / nodemcu-modules

Modules for nodeMcu (LUA intepreter for ESP8266)
76 stars 47 forks source link

PANIC: Attempt to index nil value #8

Open BorisBrock opened 8 years ago

BorisBrock commented 8 years ago

Neither version works for me. I always get the error:

PANIC: unprotected error in call to Lua API (dht22.lua:73: attempt to index global 'bit' (a nil value))

javieryanez commented 8 years ago

Sorry, now I have abandoned LUA programming. But others have continued to develop my module, you can find the latest version in https://github.com/nodemcu/nodemcu-firmware/tree/master/lua_modules/dht_lib

wardg32 commented 8 years ago

@VanKurt You probably figured this out by now but you need to be running a nodemcu build with the "bit" module included.

That said, I can't get it to work either but that was step one :-)

sasha42 commented 7 years ago

Since I stumbled here, thought I'd share my solution with others:

I used nodemcu-build to build my firmware, and explicitly chose the "bit" option.