We save known file script1.lua
Try to saving file script1.lua ...
Save file script1.lua: Success.
FileSaveESP: Try to save file to ESP...
DataSender: start "Smart Mode"
FileSaveESP: Starting...
sending:file.remove("script1.lua");<CR><LF>
recv:file.remove
recv:("script1.lua");<CR><LF>
recv:>
recv:
sending:file.open("script1.lua","w+");<CR><LF>
recv:file.op
recv:en("script1.lua","w+");<CR><LF>
sending:w = file.writeline<CR><LF>
recv:>
recv:w = file.writeline
sending:w([[timerId = 0]]);<CR><LF>
recv:w([[timer
recv:Id = 0]]);<CR><LF>
recv:>
sending:w([[dly = 1000]]);<CR><LF>
recv:w([[dly = 1000]]
recv:);
sending:w([[-- use D4]]);<CR><LF>
recv:w([[-- use D
recv:4]]);<CR><LF>
recv:>
sending:w([[ledPin = 4]]);<CR><LF>
recv:w([[ledPin = 4]]);
recv:
>
sending:w([[-- set mode to output]]);<CR><LF>
recv:w([[-- set mode to output]]);<CR><LF>
recv:>
sending:w([[gpio.mode(ledPin,gpio.OUTPUT)]]);<CR><LF>
recv:w([[gpio.mod
recv:e(ledPin,gpio.OUTPUT)]]);<CR><LF>
recv:>
sending:w([[ledState = 0]]);<CR><LF>
recv:w([[ledState
recv: = 0]]);<CR><LF>
recv:>
sending:w([[-- timer loop]]);<CR><LF>
recv:w([[-- timer lo
recv:op]]);
sending:w([[tmr.alarm( timerId, dly, 1, function()]]);<CR><LF>
recv:w([[tmr.alarm( timerId
recv:, dly, 1, function()]]);<CR><LF>
recv:>
sending:w([[ledState = 1 - ledState;]]);<CR><LF>
recv:w([[l
recv:edState = 1 - ledState;]]);<CR><LF>
recv:>
sending:w([[-- write state to D4]]);<CR><LF>
recv:w([[-- write s
recv:tate to D4]]);<CR><LF>
recv:>
sending:w([[gpio.write(ledPin, ledState)]]);<CR><LF>
recv:w([[
recv:gpio.write(ledPin, ledState)]]);<CR><LF>
recv:>
sending:w([[end) ]]);<CR><LF>
recv:w([[end) ]]);
recv:<CR><LF>
recv:>
sending:file.close();<CR><LF>
recv:file.clos
recv:e();<CR><LF>
recv:>
sending:dofile("script1.lua");<CR><LF>
recv:dofi
recv:le("script1.lua");<CR><LF>
Operation done. Duration = 821 ms
As you can see it just writes each line to the file on the ESP and then runs the file. My blue light starts to blink.
I can't guess what the problem is since I don't use the windows version.