Description
First of all, thanks for working on this project, I have been wanting a Golang-based CLI for the Arduino toolchain for the longest time.
It would appear that in order to upload code to an Arduino that is connected directly to the ttyAMA0
serial port via the pins on a Raspberry Pi, UP2 board or other board, a GPIO pin-based DTR reset needs to be implemented.
Such like an implementation could be an additional flag named something like gpioreset
that is conditional similar to what https://github.com/arduino/arduino-cli/blob/master/commands/upload/upload.go#L212 does, but that pulls the GPIO pin high/low similar to https://github.com/platformio/platformio-core/pull/687/files#diff-9df12ed969b3177c694a1020f4de5cc8R82 but of course allowing a specific GPIO pin to be specified.
For example:
arduino-cli upload -p /dev/ttyAMA0 -gpioreset 4 --fqbn atmel-avr-xminis:avr:atmega328 Arduino/MyFirstSketch
would use GPIO4 to perform the reset before attempting the upload.
Any thoughts on this?