Last active
November 13, 2022 18:16
-
-
Save nicinabox/cee1ced859218dc77617c82ae37b7d6e to your computer and use it in GitHub Desktop.
Revisions
-
nicinabox revised this gist
Jan 30, 2017 . 1 changed file with 7 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -7,10 +7,12 @@ TARGET=$1 ls /dev/tty* > /tmp/1 echo "Reset your Pro Micro now" while [[ -z $USB ]]; do sleep 1 ls /dev/tty* > /tmp/2 USB=`diff /tmp/1 /tmp/2 | grep -o '/dev/tty.*'` done avrdude -p atmega32u4 -c avr109 -P $USB -U flash:w:$TARGET -
nicinabox created this gist
Jan 26, 2017 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ #!/bin/bash # Usage # ./flash.sh path/to/your.hex TARGET=$1 ls /dev/tty* > /tmp/1 echo "Reset your Pro Micro then hit any key to continue..." read -n 1 -s ls /dev/tty* > /tmp/2 USB=`diff /tmp/1 /tmp/2 | grep '>' | sed -e 's/> //'` avrdude -p atmega32u4 -c avr109 -P $USB -U flash:w:$TARGET