diff options
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/ard-reset-arduino | 13 | ||||
| -rwxr-xr-x | bin/wait-connection-leonardo | 15 |
2 files changed, 12 insertions, 16 deletions
diff --git a/bin/ard-reset-arduino b/bin/ard-reset-arduino index 6269878..de5cf93 100755 --- a/bin/ard-reset-arduino +++ b/bin/ard-reset-arduino @@ -39,7 +39,18 @@ foreach my $dev (@ARGV) $p->write_settings; $p->close; - print STDERR "Switching to 1200 baud on $dev\n" + print STDERR "Forcing reset using 1200bps open/close on port $dev\n" + if $Opt{verbose}; + + # wait for it to come back + sleep 1; + while( ! -e $dev ) { + print STDERR "Waiting for $dev to come back\n" + if $Opt{verbose}; + sleep 1; + } + + print STDERR "$dev has come back after reset\n" if $Opt{verbose}; } else diff --git a/bin/wait-connection-leonardo b/bin/wait-connection-leonardo deleted file mode 100755 index 6a594d2..0000000 --- a/bin/wait-connection-leonardo +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -while [ ! -e $1 ] -do - echo Waiting connection at $1 - sleep 0.2 -done - -sleep 1 -# necessary for me... -# /dev/ttyACM0 used to disappear after the reset -# but no longer now. How can I tell whether the -# connection is ready? - -echo Connection Established |
