Post your best Lua script examples here

User avatar
By John W
#9863
Charles wrote:
John W wrote:
I had big problems with the DHT11-sensor before upgrading to the latest nodeMCU.
As a noob i wasn't aware of that there were newer versions available (ran the firmware that was supplied with ESP8266Flasher).
So the firmware from Januari was the fault. Now everything works way better, no random restarts either!

I'll guess more noobs will do the same mistake though...


Well John - i had problems with dht-11 and nodemcu from januay and february. The reading Was wrong. So i downgraded to 20141223 - and dht11 works perfect but i cant connect to thingsspeak.com becouse nothing is send.
If You have working code for dht-11 on latest nodemcu please share it.


You are using the right nodemcu version.
I used this script!
viewtopic.php?f=19&t=1470

I saved the main lua script as init.lua.

Make sure that your device is connected and has got an IP (is pingable on the network)!