Closed adrcunha closed 4 years ago
Thank you very much for the PR.
Possibly you want to submit another PR that sets up the default device for MacOS? Using something like
PORT=$(ls /dev/cu.usbmodem*)
should do it, I think.
Thank you very much for the PR.
Possibly you want to submit another PR that sets up the default device for MacOS? Using something like
PORT=$(ls /dev/cu.usbmodem*)
should do it, I think.
I'm not sure there's a safe pattern here. My Arduino UNO appears as /dev/cu.usbmodem1401
, but my Arduino Nano appears as /dev/cu.usbserial-1410
. Different docs around the Internet mention different variations of (cu|tty).(serial|usb)modem*
as the right port(s). So, for simplicity sake, I decided to not change the default port or define it at runtime. But if I figure it out at some point I'll definitely send you a PR.
AFAIK, the cu/tty stuff was introduced in Solaris sometime in the nineties. If a modem was hanging on a serial line, the cu-form was used for dialing out, and the tty-version for dialing-in. There was some difference on how the modem control lines were used.
On MacOS, I have never noticed any difference. FWIW...
The original script is macOS compatible, just missing the correct location of avrdude.
This PR updates the script to point to the right location of avrdude on macOS, assuming Arduino IDE was installed in /Applications (the default location).
Tested manually on macOS Mojave with an Arduino UNO: