Hi all,
I've been experimenting with Paul's workaround to use arduino-cli with my Teensy 3.2 to automate my workflow. While it's been working great from all existing shells on my computer, the same cannot be said when calling arduino-cli from within Python. Instead of the usual behavior (compile then upload), the code gets compiled but fails to upload to the Teensy. The Teensy just hangs, with the Loader displaying that "Arduino is attempting to put Teensy into Program Mode", and the command line returns the following error:
I am using the following line to compile and upload:
I have tried using os.system() and subprocess.run()/subprocess.call(), all with the same result. I also tried to offload arduino-cli itself off of Python, instead writing a batch script for it. When the script is called from the command line, it works as expected. When it is called from within Python, I get the same error.
Has anyone experience a similar problem?
- Raul
I've been experimenting with Paul's workaround to use arduino-cli with my Teensy 3.2 to automate my workflow. While it's been working great from all existing shells on my computer, the same cannot be said when calling arduino-cli from within Python. Instead of the usual behavior (compile then upload), the code gets compiled but fails to upload to the Teensy. The Teensy just hangs, with the Loader displaying that "Arduino is attempting to put Teensy into Program Mode", and the command line returns the following error:
Code:
[INDENT]
Unable to open COM4 for reboot request
Windows Error Info: Access is denied.
more ideas... [url]https://forum.pjrc.com/threads/40632?p=126667&viewfull=1#post126667[/url]
Teensy did not respond to a USB-based request to enter program mode.
Please press the PROGRAM MODE BUTTON on your Teensy to upload your sketch.[/INDENT]
I am using the following line to compile and upload:
Code:
/path/to/arduino-cli.exe compile --upload /path/to/treadmillEncoder.ino -p COM4 -b teensy:avr:teensy31
Has anyone experience a similar problem?
- Raul
