Any way to configure timeout for Upload-Monitor?

I had the same problem and fixed it by adding the following line to platformio.ini (below the [env: ] line:

extra_scripts = post:extra_script.py

Then adding a file named extra_script.py in the same folder as platformio.ini containing:

Import("env")

def after_upload(source, target, env):
    print "Delay while uploading..."
    import time
    time.sleep(2)
    print "Done!"

env.AddPostAction("upload", after_upload)

The amount of time to wait is specified in the time.sleep(x) command, 2 seconds worked for a Teensy 3.6 project that’s about 300k of downloaded data. You can adjust as needed.

6 Likes