Lightning-Fast File Uploads
Posted: Thu Dec 25, 2014 3:37 pm
Hi,
I wrote a Python script (attached below) whitch uploads a file to the ESP board in the shortest time possible.
For comparison, I took a larger Lua test-file I found in this forum (lhttp.lua) which has 128 Lines and 3500 Bytes. Uploading this with LuaLoader takes about 61 seconds, which is a long turn-around cycle when developing something. I already posted a previous version of my script here viewtopic.php?f=22&t=677&start=30#p5345. Using this script the upload only takes 11.2 seconds. But it is not optimized, and sends the file line by line.
The updated version of my script (which you can find attached below) needs just 2.2 seconds to transfer the whole test-file.
I am editing the Lua files with Sublime Text (which allows uploading and executing the Lua file with F7 and, in case of an error allows jumping to the corresponding line with F4) and therefore integrated the uploader.py script using the included myNodeMcu.sublime-build file. But uploader.py can of course also be used without Sublime Text.
Have fun,
Markus
I wrote a Python script (attached below) whitch uploads a file to the ESP board in the shortest time possible.
For comparison, I took a larger Lua test-file I found in this forum (lhttp.lua) which has 128 Lines and 3500 Bytes. Uploading this with LuaLoader takes about 61 seconds, which is a long turn-around cycle when developing something. I already posted a previous version of my script here viewtopic.php?f=22&t=677&start=30#p5345. Using this script the upload only takes 11.2 seconds. But it is not optimized, and sends the file line by line.
The updated version of my script (which you can find attached below) needs just 2.2 seconds to transfer the whole test-file.
I am editing the Lua files with Sublime Text (which allows uploading and executing the Lua file with F7 and, in case of an error allows jumping to the corresponding line with F4) and therefore integrated the uploader.py script using the included myNodeMcu.sublime-build file. But uploader.py can of course also be used without Sublime Text.
Have fun,
Markus