Created
September 15, 2016 20:31
-
-
Save nooges/75c63b624bc93af3493a4c7877589ecb to your computer and use it in GitHub Desktop.
Script to flash Pro Micro controller
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
#!/bin/sh | |
dfuport=$(ls -rt /dev/tty.usb* | tail -n1) | |
echo "Device tty: $dfuport" | |
if [ -z "$dfuport" ]; then | |
echo "Bootloader not detected" | |
else | |
avrdude -p atmega32u4 -P $dfuport -c avr109 -U flash:w:$1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment