Skip to content

Instantly share code, notes, and snippets.

@ahtn
Last active January 14, 2018 02:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ahtn/fa396273f8f7d3549898b21e0ccf0afe to your computer and use it in GitHub Desktop.
Save ahtn/fa396273f8f7d3549898b21e0ccf0afe to your computer and use it in GitHub Desktop.
#!/bin/bash
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 m32u4 -c avr109 -P $USB -U eeprom:w:./eeprom-lefthand.eep -u
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment