I have an Arduino-based device (www.picobrew.com) and needs firmware updating. The company wrote a little app to do it for Windows users, but us OS X users are out in the cold. Fortunately, we were able to use the Arduino app and some terminal commands to get around not having their app. Some people, however, are a little afraid to tinker in Terminal. I found this post, which seems like a good start, but I have two variables, the file name of the firmware file and the name of the Arduino serial port that I'm not quite sure how to get into the script without hardcoding. Here is the script:
/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avrdude -C /Applications/Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf -c arduino -P /dev/tty.usbmodemFD121 -p atmega1284p -U flash:w:$HOME/Desktop/Zymatic_RC_1_1_9.hex
I can find the name of the serial port with this command:
ls /dev/tty.usb*
But how can I populate the first script with the result of this one?
Additionally, is there a way to prompt for a file location?
Apologies if any of this is super basic. I have extremely limited Terminal experience and zero AppleScript experience. Thanks for any help.