Hans174 wrote:Hello,
@ zeroday
Thank you very much for your LUA implementation. I flashed your latest file and it works fine.
@ scargill
Maybe you can switch to an I2C temperature sensor. The LM75 should do the job.
Hans
Have you tried lm75 with esp8266?
Lets get the party started and +1
[url=https://www.banggood.com/custlink/KvGGhGF4wG[/url]
I like ESP8266 and ESP8285 and ESP32
file.open("blinkled.lua","w")
file.writeline([[led = 8]])
file.writeline([[gpio.mode(led,gpio.OUTPUT)]])
file.writeline([[for i=0,5,1]])
file.writeline([[do]])
file.writeline([[gpio.write(led,gpio.HIGH)]])
file.writeline([[tmr.delay(1000000)]])
file.writeline([[gpio.write(led,gpio.LOW)]])
file.writeline([[tmr.delay(1000000)]])
file.writeline([[end]])
file.close()
dofile("blinkled.lua")
The led blinks every second so the improved tmr.delay is very likely now resetting the watchdog.
My guess is the watchdog is integral to many expessif routines and is set maybe as a fuse at compile time so one way to prevent it from
counting out is to reset the watchdog counter..What is confusing is there are AT commands that claim to disable and enable the watchdog...The AT is just plain messy.
Anyway having the watchdog always running is very often what you want and resetting it within tmr.delay is a good solution especially since a tmr.delay is blocking
What with various dialects and often more varied responses it is nice to see the AT mess in the rear view mirror thanks to NodeMcu and lua scripts.
https://github.com/nodemcu/nodemcu-firmware
and remove api doc from the repo, because I found out that I can push directly to nodemcu-firmware.wiki.
I update wiki manually by copy&paste before...