Last active
October 23, 2016 16:41
-
-
Save ConnorRigby/b8acfeb91d1c087680efeb489d9c926c to your computer and use it in GitHub Desktop.
script to download the latest farmbot arduino firmware
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo -i | |
apt-get install avrdude | |
mkdir /tmp/farmbot-firmware | |
cd /tmp/farmbot-firmware | |
wget https://github.com/FarmBot/farmbot-arduino-firmware/releases/download/v0.0.1/firmware.hex -O firmware.hex | |
HEX_FILE=$(pwd)/firmware.hex | |
if [ -a /dev/ttyACM0 ] | |
then | |
TTY=/dev/ttyACM0 | |
elif [ -a /dev/ttyUSB0 ] | |
then | |
TTY=/dev/ttyUSB0 | |
fi | |
avrdude -v -patmega2560 -cwiring -P$TTY -b115200 -D -Uflash:w:$HEX_FILE:i |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment