-- John Longworth June 2107 majorVer, minorVer, devVer, chipid, flashid, flashsize, flashmode, flashspeed = node.info() fs = node.flashsize()/ 1024 print("Mac Address "..wifi.sta.getmac()) print("Flash Size = "..fs.." Mb") print("NodeMCU "..majorVer.."."..minorVer.."."..devVer) print("Chip ID "..chipid) print("Flash ID "..flashid) print("Flash Mode "..flashmode) print("Flash Speed "..flashspeed.." baud") print("Heap Size "..node.heap()) _, reset_reason = node.bootreason() local rsr="" if reset_reason == 0 then rsr = "Power Up " end if reset_reason == 1 then rsr = "Hardware Watchdog Reset " end if reset_reason == 2 then rsr = "Exception Reset " end if reset_reason == 3 then rsr = "Software Watchdog Reset " end if reset_reason == 4 then rsr = "Software Restart " end if reset_reason == 5 then rsr = "Wake from deep sleep " end if reset_reason == 6 then rsr = "External Reset " end print("Last start up reason is "..rsr..reset_reason) print("\nFiles in memory :\n") l = file.list(); for k,v in pairs(l) do print(string.format("%24s %6d bytes",k, v)) end collectgarbage()