nodemcu-modules
nodemcu-modules copied to clipboard
PANIC: Attempt to index nil value
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))
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
@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 :-)
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.