for new nodemcu-firmware release 2.2.x
This commit is contained in:
parent
b597441192
commit
8b3e61be61
1
main.lua
1
main.lua
@ -115,7 +115,6 @@ function normalOperation()
|
|||||||
mydofile("webserver")
|
mydofile("webserver")
|
||||||
startWebServer()
|
startWebServer()
|
||||||
end)
|
end)
|
||||||
|
|
||||||
displayTime()
|
displayTime()
|
||||||
-- Start the time Thread
|
-- Start the time Thread
|
||||||
tmr.alarm(1, 20000, 1 ,function()
|
tmr.alarm(1, 20000, 1 ,function()
|
||||||
|
1376
os/esptool.py
1376
os/esptool.py
File diff suppressed because it is too large
Load Diff
@ -32,5 +32,6 @@ if [ $? -ne 0 ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#./esptool.py --port /dev/$DEVICE $BAUD write_flash 0x00000 nodemcu-master-enduser_setup,file,gpio,net,node,rtcfifo,rtcmem,rtctime,sntp,spi,tmr,uart,wifi,ws2812-integer.bin
|
./esptool.py --port /dev/$DEVICE $BAUD write_flash -fm dio 0x00000 nodemcu2.bin
|
||||||
./esptool.py --port /dev/ttyUSB0 $BAUD write_flash 0x00000 0x00000.bin 0x10000 0x10000.bin
|
# 0x3fc000 esp_init_data_default_v08.bin 0x07e000 blank.bin 0x3fe000 blank.bin
|
||||||
|
#./esptool.py --port /dev/$DEVICE $BAUD write_flash 0x00000 0x00000.bin 0x10000 0x10000.bin
|
||||||
|
Binary file not shown.
BIN
os/nodemcu2.bin
Normal file
BIN
os/nodemcu2.bin
Normal file
Binary file not shown.
@ -18,10 +18,11 @@ if [ $# -ne 1 ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
FILES="displayword.lua main.lua timecore.lua webpage.lua webserver.lua wordclock.lua init.lua"
|
FILES="displayword.lua main.lua timecore.lua webpage.html webserver.lua wordclock.lua init.lua"
|
||||||
|
|
||||||
# Format filesystem first
|
# Format filesystem first
|
||||||
echo "Format the complete ESP"
|
echo "Format the complete ESP"
|
||||||
$LUATOOL -p $DEVICE -w
|
$LUATOOL -p $DEVICE -w -b 115200
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "STOOOOP"
|
echo "STOOOOP"
|
||||||
exit 1
|
exit 1
|
||||||
@ -36,7 +37,7 @@ for f in $FILES; do
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo "------------- $f ------------"
|
echo "------------- $f ------------"
|
||||||
$LUATOOL -p $DEVICE -f $f -t $f
|
$LUATOOL -p $DEVICE -f $f -b 115200 -t $f
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "STOOOOP"
|
echo "STOOOOP"
|
||||||
exit 1
|
exit 1
|
||||||
@ -44,6 +45,6 @@ for f in $FILES; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
echo "Reboot the ESP"
|
echo "Reboot the ESP"
|
||||||
$LUATOOL -p $DEVICE -r
|
$LUATOOL -p $DEVICE -r -b 115200
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
@ -165,7 +165,9 @@ function startWebServer()
|
|||||||
file.remove(configFile .. ".new")
|
file.remove(configFile .. ".new")
|
||||||
sec, _ = rtctime.get()
|
sec, _ = rtctime.get()
|
||||||
file.open(configFile.. ".new", "w+")
|
file.open(configFile.. ".new", "w+")
|
||||||
file.write("-- Config\n" .. "wifi.sta.config(\"" .. _POST.ssid .. "\",[[" .. _POST.password .. "]])\n" .. "sntpserverhostname=\"" .. _POST.sntpserver .. "\"\n" .. "timezoneoffset=\"" .. _POST.timezoneoffset .. "\"\n")
|
file.write("-- Config\n" .. "station_cfg={}\nstation_cfg.ssid=\"" .. _POST.ssid .. "\"\nstation_cfg.pwd=\"" .. _POST.password .. "\"\nstation_cfg.save=false\nwifi.sta.config(station_cfg)\n")
|
||||||
|
file.write("sntpserverhostname=\"" .. _POST.sntpserver .. "\"\n" .. "timezoneoffset=\"" .. _POST.timezoneoffset .. "\"\n")
|
||||||
|
|
||||||
if ( _POST.fcolor ~= nil) then
|
if ( _POST.fcolor ~= nil) then
|
||||||
-- color=string.char(_POST.green, _POST.red, _POST.blue)
|
-- color=string.char(_POST.green, _POST.red, _POST.blue)
|
||||||
print ("Got fcolor: " .. _POST.fcolor)
|
print ("Got fcolor: " .. _POST.fcolor)
|
||||||
|
Loading…
Reference in New Issue
Block a user